XEmacs 21.2.46 "Urania".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 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
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 native_sound_lib=''
251 with_gtk='no'
252 with_gnome='no'
253 use_assertions="yes"
254 with_toolbars=""
255 with_tty=""
256 use_union_type="no"
257 with_dnet=""
258 pdump="no"
259 with_dragndrop="no"
260
261
262
263
264 arguments="$@"
265
266 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
267 quoted_arguments=
268 for i in "$@"; do
269    case "$i" in
270    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
271    | --no-cr | --no-c) ;;
272    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
274    *)
275    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
276    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
277    esac
278 done
279
280 while test $# != 0; do
281   arg="$1"; shift
282   case "$arg" in
283     --no-create|--no-recursion) ;;
284         -* )
285             case "$arg" in
286         -*=*)
287           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
288           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
289           valomitted=no
290         ;;
291                                                                           -*)
292                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
293           val="yes" valomitted=yes
294         ;;
295       esac
296
297             optname="$opt"
298       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
299
300             case "${valomitted}-${opt}" in yes-without_* )
301         opt=`echo $opt | sed 's/without/with/'`
302         valomitted="no" val="no" ;;
303       esac
304
305             case "$opt" in
306
307         with_site_lisp  | \
308         with_prefix     | \
309         with_site_modules | \
310         with_x          | \
311         with_x11        | \
312         with_gtk        | \
313         with_gnome      | \
314         with_msw        | \
315         with_gcc        | \
316         dynamic         | \
317         with_ncurses    | \
318         with_dnet       | \
319         with_socks      | \
320         with_dragndrop  | \
321         with_cde        | \
322         with_offix      | \
323         with_gpm        | \
324         with_xpm        | \
325         with_xface      | \
326         with_gif        | \
327         with_jpeg       | \
328         with_png        | \
329         with_tiff       | \
330         with_wmcommand  | \
331         with_xmu        | \
332         with_purify     | \
333         with_quantify   | \
334         with_toolbars   | \
335         with_tty        | \
336         with_xfs        | \
337         with_i18n3      | \
338         with_mule       | \
339         with_file_coding| \
340         with_canna      | \
341         with_wnn        | \
342         with_wnn6       | \
343         with_workshop   | \
344         with_sparcworks | \
345         with_tooltalk   | \
346         with_ldap       | \
347         with_postgresql | \
348         with_pop        | \
349         with_kerberos   | \
350         with_hesiod     | \
351         with_dnet       | \
352         with_infodock   | \
353         with_netinstall   | \
354         external_widget | \
355         verbose         | \
356         extra_verbose   | \
357         usage_tracking  | \
358         use_union_type  | \
359         pdump           | \
360         debug           | \
361         use_assertions  | \
362         memory_usage_stats | \
363         with_clash_detection | \
364         with_modules | \
365         quick_build )
366                   case "$val" in
367             y | ye | yes )      val=yes ;;
368             n | no )            val=no  ;;
369             * ) (echo "$progname: Usage error:"
370 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
371 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
372           esac
373           eval "$opt=\"$val\"" ;;
374
375
376                         srcdir          | \
377         compiler        | \
378         cflags          | \
379         cpp             | \
380         cppflags        | \
381         libs            | \
382         ldflags         | \
383         cache_file      | \
384         native_sound_lib| \
385         site_lisp       | \
386         x_includes      | \
387         x_libraries     | \
388         site_includes   | \
389         site_libraries  | \
390         site_prefixes   | \
391         site_runtime_libraries )
392                   if test "$valomitted" = "yes" ; then
393                     if test "$#" = 0 ; then
394               (echo "$progname: Usage error:"
395 echo " " "The \`--$optname' option requires a value."
396 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
397             fi
398             val="$1"; shift
399           fi
400           eval "$opt=\"$val\""
401         ;;
402
403                 rel_alloc | \
404         with_dlmalloc | \
405         with_debug_malloc  | use_debug_malloc | \
406         with_system_malloc | use_system_malloc )
407           case "$val" in
408             y | ye | yes )      val=yes ;;
409             n | no )            val=no  ;;
410             d | de | def | defa | defau | defaul | default ) val=default ;;
411             * ) (echo "$progname: Usage error:"
412 echo " " "The \`--$optname' option requires one of these values:
413   \`yes', \`no', or \`default'."
414 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
415           esac
416           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
417           eval "$opt=\"$val\""
418         ;;
419
420                 "with_database" )
421           with_database_berkdb=no
422           with_database_dbm=no
423           with_database_gdbm=no
424           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
425             case "$x" in
426               no ) ;;
427               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
428               d | db | dbm )                               with_database_dbm=yes    ;;
429               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
430               * ) (echo "$progname: Usage error:"
431 echo " " "The \`--$optname' option value
432   must be either \`no' or a comma-separated list
433   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
434 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
435             esac
436           done
437           if test "$with_database_dbm"  = "yes" -a \
438                   "$with_database_gdbm" = "yes"; then
439           (echo "$progname: Usage error:"
440 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
441   with the \`--$optname' option."
442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
443           fi
444         ;;
445
446                 "with_sound" )
447                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
448             case "$x" in
449                       n | no | non | none ) new_sdefault=no ;;
450               a | al | all | both ) new_sdefault=yes ;;
451
452               native )       with_native_sound=yes ;;
453               nonative )     with_native_sound=no ;;
454
455               nas )          with_nas_sound=yes ;;
456               nonas )        with_nas_sound=no ;;
457
458               esd )          with_esd_sound=yes ;;
459               noesd )        with_esd_sound=no ;;
460
461               * ) bogus_sound=yes ;;
462             esac
463             if test "$bogus_sound" -o \
464                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
465                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
466                 (echo "$progname: Usage error:"
467 echo " " "Valid types for the \`--$optname' option are:
468   $types.
469 The default is to autodetect all sound support."
470 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
471             elif test -n "$new_sdefault" ; then
472                 with_native_sound=$new_sdefault
473                 with_nas_sound=$new_sdefault
474                 with_esd_sound=$new_sdefault
475                 new_sdefault=   # reset this
476             fi
477             sound_notfirst=true
478           done
479         ;;
480
481                         "with_athena" )
482           case "$val" in
483             xa | xaw )                    val=xaw    ;;
484             3 | 3d | xaw3d )              val=3d     ;;
485                         ne | nex | next | naxtaw)     val=next   ;;
486                         9 | 95 | xaw95 )              val=95     ;;
487             xp | xpm | xawxpm )           val=xpm    ;;
488             * ) (echo "$progname: Usage error:"
489 echo " " "The \`--$optname' option must have one of these values:
490   \`xaw', \`3d', \`next', \`95', or \`xpm'."
491 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
492           esac
493           eval "$opt=\"$val\""
494         ;;
495
496                 "with_xim" )
497           case "$val" in
498             y | ye | yes )                val=yes   ;;
499             n | no | non | none )         val=no    ;;
500             x | xl | xli | xlib )         val=xlib  ;;
501             m | mo | mot | moti | motif ) val=motif ;;
502             * ) (echo "$progname: Usage error:"
503 echo " " "The \`--$optname' option must have one of these values:
504   \`motif', \`xlib', \`yes', or \`no'."
505 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
506           esac
507           eval "$opt=\"$val\""
508         ;;
509
510                 "mail_locking" )
511           case "$val" in
512             lockf )     val=lockf ;;
513             flock )     val=flock ;;
514             file | dot ) val=file  ;;
515             locking )   val=locking  ;;
516             * ) (echo "$progname: Usage error:"
517 echo " " "The \`--$optname' option must have one of these values:
518   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
519 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
520           esac
521           eval "$opt=\"$val\""
522         ;;
523
524                 "error_checking" )
525                           
526           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
527             case "$x" in
528                       n | no | non | none ) new_default=no ;;
529               a | al | all )        new_default=yes ;;
530
531               extents )       error_check_extents=yes ;;
532               noextents )     error_check_extents=no ;;
533
534               typecheck )     error_check_typecheck=yes ;;
535               notypecheck )   error_check_typecheck=no ;;
536
537               bufpos )        error_check_bufpos=yes ;;
538               nobufpos )      error_check_bufpos=no ;;
539
540               gc )            error_check_gc=yes ;;
541               nogc )          error_check_gc=no ;;
542
543               malloc )        error_check_malloc=yes ;;
544               nomalloc )      error_check_malloc=no ;;
545
546               byte_code )     error_check_byte_code=yes ;;
547               nobyte_code )   error_check_byte_code=no ;;
548
549               glyphs )     error_check_glyphs=yes ;;
550               noglyphs )   error_check_glyphs=no ;;
551
552               * ) bogus_error_check=yes ;;
553             esac
554             if test "$bogus_error_check" -o \
555                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
556                 if test "$error_check_default" = yes ; then
557                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
558                 else
559                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
560                 fi
561                 (echo "$progname: Usage error:"
562 echo " " "Valid types for the \`--$optname' option are:
563   $types."
564 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
565             elif test -n "$new_default" ; then
566                 error_check_extents=$new_default
567                 error_check_typecheck=$new_default
568                 error_check_bufpos=$new_default
569                 error_check_gc=$new_default
570                 error_check_malloc=$new_default
571                 error_check_byte_code=$new_default
572                 error_check_glyphs=$new_default
573                 new_default=    # reset this
574             fi
575             echeck_notfirst=true
576           done
577         ;;
578
579                                 
580                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
581         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
582         archlibdir | docdir | package_path )
583                    if test "$valomitted" = "yes"; then
584              if test "$#" = 0; then
585                  (echo "$progname: Usage error:"
586 echo " " "The \`--$optname' option requires a value."
587 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
588              fi
589              val="$1"; shift
590            fi
591            eval "$opt=\"$val\""
592
593                            case "$opt" in
594                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining EXEC_PREFIX_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define EXEC_PREFIX_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining LISPDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define LISPDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining SITELISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define SITELISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining MODULEDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define MODULEDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining ETCDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define ETCDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining INFODIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define INFODIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFOPATH_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFOPATH_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining PACKAGE_PATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define PACKAGE_PATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              datadir )
659                 { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining INFODIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define INFODIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining LISPDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define LISPDIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining MODULEDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define MODULEDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining ETCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define ETCDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining DOCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define DOCDIR_USER_DEFINED 1
696 EOF
697 }
698
699                 { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining ARCHLIBDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define ARCHLIBDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining DOCDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define DOCDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
716     Defining ARCHLIBDIR_USER_DEFINED
717 EOF
718 cat >> confdefs.h <<\EOF
719 #define ARCHLIBDIR_USER_DEFINED 1
720 EOF
721 }
722  ;;
723            esac
724         ;;
725
726                 "no_create" ) ;;
727
728                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
729
730                 "with_menubars"   | \
731         "with_scrollbars" | \
732         "with_dialogs"    | \
733         "with_widgets" )
734           case "$val" in
735             l | lu | luc | luci | lucid )               val=lucid  ;;
736             m | mo | mot | moti | motif )               val=motif  ;;
737             a | at | ath | athe | athen | athena )      val=athena ;;
738             n | no | non | none )                       val=no     ;;
739             y | ye | yes )                              val=yes    ;;
740             g | gt | gtk )                              val=gtk    ;;
741             m | ms | msw )                              val=msw    ;;
742             * ) (echo "$progname: Usage error:"
743 echo " " "The \`--$optname' option must have one of these values:
744   \`gtk\', \`lucid', \`motif', \`athena', \`yes', or \`no'."
745 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
746           esac
747           eval "$opt=\"$val\""
748         ;;
749
750                 "use_minimal_tagbits" | \
751         "use_indexed_lrecord_implementation" | \
752         "run_in_place"  | \
753         "const_is_losing" | \
754         "with_gnu_make" )
755           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
756         ;;
757
758                 * ) (echo "$progname: Usage error:"
759 echo " " "Unrecognized option: $arg"
760 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
761
762       esac
763     ;;
764
765         *-*-*) configuration="$arg" ;;
766
767         *) (echo "$progname: Usage error:"
768 echo " " "Unrecognized argument: $arg"
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
770
771   esac
772 done
773
774
775 test -n "$cpp"      && CPP="$cpp"
776 test -n "$cppflags" && CPPFLAGS="$cppflags"
777 test -n "$libs"     && LIBS="$libs"
778 test -n "$ldflags"  && LDFLAGS="$ldflags"
779
780 eval set x "$quoted_arguments"; shift
781
782 test "$extra_verbose" = "yes" && verbose=yes
783
784 test -n "$with_x" && with_x11="$with_x"
785
786 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
787   test "$with_system_malloc" = "default" && with_system_malloc=yes
788 fi
789
790
791
792 if test "$with_cde $with_tooltalk" = "yes no"; then
793   (echo "$progname: Usage error:"
794 echo " " "--with-cde requires --with-tooltalk"
795 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
796 elif test "$with_tooltalk" = "no" ; then with_cde=no
797 elif test "$with_cde" = "yes"; then with_tooltalk=yes
798 fi
799
800
801 case "$srcdir" in
802
803     "" )
804     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
805       if test -f "$dir/src/lisp.h" -a \
806               -f "$dir/lisp/version.el" ; then
807         srcdir="$dir"
808         break
809       fi
810     done
811     if test -z "$srcdir" ; then
812       (echo "$progname: Usage error:"
813 echo " " "Neither the current directory nor its parent seem to
814   contain the XEmacs sources.  If you do not want to build XEmacs in its
815   source tree, you should run \`$progname' in the directory in which
816   you wish to build XEmacs, using the \`--srcdir' option to say where the
817   sources may be found."
818 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
819     fi
820   ;;
821
822     * )
823     if test ! -f "$srcdir/src/lisp.h" -o \
824             ! -f "$srcdir/lisp/version.el" ; then
825       (echo "$progname: Usage error:"
826 echo " " "The directory specified with the \`--srcdir' option,
827   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
828   either run the \`$progname' script at the top of the XEmacs source
829   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831     fi
832   ;;
833 esac
834
835 if test -z "$configuration"; then
836     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
837   if test -z "$configuration"; then
838     (echo "$progname: Usage error:"
839 echo " " "XEmacs has not been ported to this host type.
840 Try explicitly specifying the CONFIGURATION when rerunning configure."
841 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
842   fi
843 fi
844
845 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
846 echo "configure:847: checking whether ln -s works" >&5
847
848 rm -f conftestdata
849 if ln -s X conftestdata 2>/dev/null
850 then
851   rm -f conftestdata
852   ac_cv_prog_LN_S="ln -s"
853 else
854   ac_cv_prog_LN_S=ln
855 fi
856 LN_S="$ac_cv_prog_LN_S"
857 if test "$ac_cv_prog_LN_S" = "ln -s"; then
858   echo "$ac_t""yes" 1>&6
859 else
860   echo "$ac_t""no" 1>&6
861 fi
862
863
864 for dir in lisp etc man info tests; do
865   if test ! -d "$dir" ; then
866     echo Making symbolic link to "$srcdir/$dir"
867     ${LN_S} "$srcdir/$dir" "$dir"
868   fi
869 done
870
871
872 absolute_pwd="`pwd`";
873 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
874 then blddir="$PWD"
875 else blddir="$absolute_pwd"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   blddir=`echo "$blddir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi
880 fi
881
882
883 case "$srcdir" in
884   /* ) ;;
885   .  ) srcdir="$blddir" ;;
886   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
887   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888   srcdir=`echo "$srcdir" | \
889    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi ;;
891 esac
892
893 if test `pwd` != `sh -c cd $srcdir && pwd`  \
894    && test -f "$srcdir/src/config.h"; then
895   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
896    echo "   as a build directory right now; it has been configured in its own"
897    echo "   right.  To configure in another directory as well, you MUST"
898    echo "   use GNU make.  If you do not have GNU make, then you must"
899    echo "   now do \`make distclean' in $srcdir,"
900    echo "   and then run $progname again.") >&2
901   extrasub='/^VPATH[     ]*=/c\
902 vpath %.c $(srcdir)\
903 vpath %.h $(srcdir)\
904 vpath %.y $(srcdir)\
905 vpath %.l $(srcdir)\
906 vpath %.s $(srcdir)\
907 vpath %.in $(srcdir)'
908 fi
909
910 . "$srcdir/version.sh" || exit 1;
911 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
912 : "${extra_verbose=$beta}"
913 version="${emacs_major_version}.${emacs_minor_version}"
914 { test "$extra_verbose" = "yes" && cat << EOF
915     Defining EMACS_MAJOR_VERSION = $emacs_major_version
916 EOF
917 cat >> confdefs.h <<EOF
918 #define EMACS_MAJOR_VERSION $emacs_major_version
919 EOF
920 }
921
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MINOR_VERSION = $emacs_minor_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MINOR_VERSION $emacs_minor_version
927 EOF
928 }
929
930 if test -n "$emacs_beta_version" ; then
931   if test "$beta" = "yes"; then
932         version="${version}-b${emacs_beta_version}"
933         { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_BETA_VERSION = $emacs_beta_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_BETA_VERSION $emacs_beta_version
938 EOF
939 }
940
941   else
942         version="${version}.${emacs_beta_version}"
943         { test "$extra_verbose" = "yes" && cat << EOF
944     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
945 EOF
946 cat >> confdefs.h <<EOF
947 #define EMACS_PATCH_LEVEL $emacs_beta_version
948 EOF
949 }
950
951   fi
952 fi
953 { test "$extra_verbose" = "yes" && cat << EOF
954     Defining XEMACS_CODENAME = "$xemacs_codename"
955 EOF
956 cat >> confdefs.h <<EOF
957 #define XEMACS_CODENAME "$xemacs_codename"
958 EOF
959 }
960
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining EMACS_VERSION = "$version"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define EMACS_VERSION "$version"
966 EOF
967 }
968
969
970 if test "$with_infodock" = "yes"; then
971   if test ! -f ../../ID-INSTALL; then
972     echo "Cannot build InfoDock without InfoDock sources"
973     with_infodock=no
974   fi
975 fi
976
977 if test "$with_infodock" = "yes"; then
978       { test "$extra_verbose" = "yes" && cat << EOF
979     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
980 EOF
981 cat >> confdefs.h <<EOF
982 #define INFODOCK_MAJOR_VERSION $infodock_major_version
983 EOF
984 }
985
986   { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MINOR_VERSION $infodock_minor_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_BUILD_VERSION $infodock_build_version
999 EOF
1000 }
1001
1002   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1003   PROGNAME=infodock
1004   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1005 else
1006   PROGNAME=xemacs
1007 fi
1008
1009 { test "$extra_verbose" = "yes" && cat << EOF
1010     Defining EMACS_PROGNAME = "$PROGNAME"
1011 EOF
1012 cat >> confdefs.h <<EOF
1013 #define EMACS_PROGNAME "$PROGNAME"
1014 EOF
1015 }
1016
1017
1018 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1019 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1020     Defining ERROR_CHECK_EXTENTS
1021 EOF
1022 cat >> confdefs.h <<\EOF
1023 #define ERROR_CHECK_EXTENTS 1
1024 EOF
1025 }
1026
1027 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_TYPECHECK
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_TYPECHECK 1
1032 EOF
1033 }
1034
1035 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_BUFPOS
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_BUFPOS 1
1040 EOF
1041 }
1042
1043 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_GC
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_GC 1
1048 EOF
1049 }
1050
1051 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_MALLOC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_MALLOC 1
1056 EOF
1057 }
1058
1059 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_BYTE_CODE
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_BYTE_CODE 1
1064 EOF
1065 }
1066
1067 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_GLYPHS
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_GLYPHS 1
1072 EOF
1073 }
1074
1075 if test "${debug:=$beta}" = "yes"; then
1076   use_assertions=yes memory_usage_stats=yes
1077   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1078    echo "    xemacs will be linked with \"debug.o\""
1079  fi
1080   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1081    echo "    xemacs will be linked with \"tests.o\""
1082  fi
1083   { test "$extra_verbose" = "yes" && cat << \EOF
1084     Defining DEBUG_XEMACS
1085 EOF
1086 cat >> confdefs.h <<\EOF
1087 #define DEBUG_XEMACS 1
1088 EOF
1089 }
1090
1091 fi
1092 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1093     Defining USE_ASSERTIONS
1094 EOF
1095 cat >> confdefs.h <<\EOF
1096 #define USE_ASSERTIONS 1
1097 EOF
1098 }
1099
1100 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining MEMORY_USAGE_STATS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define MEMORY_USAGE_STATS 1
1105 EOF
1106 }
1107
1108
1109
1110 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1111 echo "configure:1112: checking "host system type"" >&5
1112 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1113 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1114 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1115 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1116 echo "$ac_t""$configuration" 1>&6
1117
1118
1119
1120
1121
1122 machine='' opsys=''
1123
1124 case "$canonical" in
1125   sparc-*-*        ) machine=sparc ;;
1126   alpha*-*-*       ) machine=alpha ;;
1127   vax-*-*          ) machine=vax ;;
1128   mips-dec-*       ) machine=pmax ;;
1129   mips-sgi-irix6*  ) machine=iris6d ;;
1130   mips-sgi-*       ) machine=iris4d ;;
1131   mips*-linux      ) machine=mips ;;
1132   romp-ibm-*       ) machine=ibmrt ;;
1133   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1134   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1135   powerpc*-*       ) machine=powerpc ;;
1136   hppa-*-*         ) machine=hp800 ;;
1137   m88k-dg-*        ) machine=aviion ;;
1138   m68*-sony-*      ) machine=news ;;
1139   mips-sony-*      ) machine=news-risc ;;
1140   clipper-*        ) machine=clipper ;;
1141   arm*             ) machine=arm ;;
1142   ns32k-*          ) machine=ns32000 ;;
1143 esac
1144
1145 case "$canonical" in
1146   *-*-linux*    ) opsys=linux ;;
1147   *-*-netbsd*   ) opsys=netbsd ;;
1148   *-*-openbsd*  ) opsys=openbsd ;;
1149   *-*-nextstep* ) opsys=nextstep ;;
1150   *-*-vms       ) opsys=vms ;;
1151
1152     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1153   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1154   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1155   *-dec-osf3*                ) opsys=decosf3-1 ;;
1156   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1157
1158     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1159   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1160   *-*-ultrix* )         opsys=ultrix4-3 ;;
1161
1162     *-*-aix3.1*  ) opsys=aix3-1 ;;
1163   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1164   *-*-aix3*    ) opsys=aix3-2   ;;
1165   *-*-aix4.0*  ) opsys=aix4     ;;
1166   *-*-aix4.1*  ) opsys=aix4-1   ;;
1167   *-*-aix4*    ) opsys=aix4-2   ;;
1168
1169     *-gnu* )                    opsys=gnu    ;;
1170   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1171   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1172   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1173   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1174   *-*-aos*   )                  opsys=bsd4-3 ;;
1175   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1176   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1177   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1178   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1179   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1180   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1181         if test -z "$NON_GNU_CPP" ; then
1182           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1183             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1184           done
1185         fi
1186         opsys=usg5-4-2 ;;
1187     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1188     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1189 esac
1190
1191 case "$canonical" in
1192
1193     *-*-netbsd* )
1194     case "$canonical" in
1195       i[3-9]86-*-netbsd*) machine=intel386 ;;
1196       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1197                                             machine=hp9000s300 ;;
1198       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1199       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1200     esac
1201   ;;
1202
1203     *-*-openbsd* )
1204     case "${canonical}" in
1205       i386-*-openbsd*)          machine=intel386 ;;
1206       m68k-*-openbsd*)          machine=hp9000s300 ;;
1207       mipsel-*-openbsd*)        machine=pmax ;;
1208      esac
1209    ;;
1210
1211     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1212   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1213
1214     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1215   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1216
1217     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1218
1219     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1220
1221     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1222
1223     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1224
1225     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1226
1227     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1228   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1229   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1230
1231   
1232     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1233
1234     *-convex-bsd* | *-convex-convexos* )
1235     machine=convex opsys=bsd4-3
1236     NON_GNU_CPP="cc -E -P"
1237   ;;
1238
1239     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1240
1241     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1242   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1243   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1244   m88k-dg-dgux*                           ) opsys=dgux     ;;
1245
1246     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1247   m88k-motorola-sysv4* )
1248                     machine=delta88k opsys=usg5-4-2
1249   ;;
1250   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1251
1252     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1253   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1254
1255     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1256
1257     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1258   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1259   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1260
1261       m88k-harris-cxux* )
1262         case "`uname -r`" in
1263        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1264        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1265     esac
1266     NON_GNU_CPP="/lib/cpp"
1267   ;;
1268     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1269     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1270
1271     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1272
1273     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1274
1275     *-hp-hpux* )
1276         case "$canonical" in
1277       m68*  ) machine=hp9000s300 ;;
1278       hppa* ) machine=hp800      ;;
1279     esac
1280
1281     case "$canonical" in
1282       *-hp-hpux7*  )  opsys=hpux   ;;
1283       *-hp-hpux8*  )  opsys=hpux8  ;;
1284       *-hp-hpux9*  )  opsys=hpux9  ;;
1285       *-hp-hpux10* )  opsys=hpux10 ;;
1286       *-hp-hpux11* )  opsys=hpux11 ;;
1287       *            )  opsys=hpux   ;;
1288     esac
1289
1290         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1291    echo "    xemacs will be linked with \"strcat.o\""
1292  fi ;; esac
1293
1294     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1295         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1296     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1297
1298     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1299   ;;
1300
1301     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1302   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1303
1304     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1305   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1306   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1307   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1308   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1309   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1310
1311     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1312   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1313
1314     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1315
1316     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1317
1318     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1319
1320     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1321
1322       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1323
1324     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1325
1326     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1327
1328     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1329
1330     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1331
1332         mips-mips-usg* ) machine=mips4 ;;
1333   mips-mips-riscos4 )
1334     machine=mips4
1335     NON_GNU_CC="cc -systype bsd43"
1336     NON_GNU_CPP="cc -systype bsd43 -E"
1337     case "$canonical" in
1338       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1339       mips-mips-riscos5* ) opsys=riscos5 ;;
1340     esac
1341   ;;
1342   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1343   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1344
1345     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1346
1347     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1348
1349     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1350   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1351
1352     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1353
1354     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1355
1356     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1357
1358     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1359
1360     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1361   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1362
1363     mips-siemens-sysv* | mips-sni-sysv*)
1364     machine=mips-siemens opsys=usg5-4
1365     NON_GNU_CC=/usr/ccs/bin/cc
1366     NON_GNU_CPP=/usr/ccs/lib/cpp
1367   ;;
1368
1369     mips-nec-sysv*)
1370     machine=mips-nec
1371     NON_GNU_CC=/usr/ccs/bin/cc
1372     NON_GNU_CPP=/usr/ccs/lib/cpp
1373   ;;
1374
1375       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1376   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1377     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1378   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1379   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1380   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1381   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1382   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1383   mips-sgi-irix*      ) opsys=irix5-0 ;;
1384
1385     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1386   *-sony-news* ) opsys=newsos5 ;;
1387
1388     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1389
1390     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1391         case "$canonical" in
1392       m68*-sunos1* )             machine=sun1     ;;
1393       m68*-sunos2* )             machine=sun2     ;;
1394       m68* )                     machine=sun3     ;;
1395       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1396       i*86-*-* )                 machine=intel386 ;;
1397       rs6000* )                  machine=rs6000   ;;
1398     esac
1399
1400         case "$canonical" in *-sunos5*)
1401       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1402     esac
1403
1404                     case "$canonical" in
1405       *-sunos4* )
1406         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1407         : ;;
1408       *-solaris2* )
1409         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1410         RANLIB=':' ;;
1411     esac
1412
1413     case "$canonical" in
1414       *-solaris*          )
1415         opsys=sol2
1416         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1417         { test "$extra_verbose" = "yes" && cat << EOF
1418     Defining OS_RELEASE = $os_release
1419 EOF
1420 cat >> confdefs.h <<EOF
1421 #define OS_RELEASE $os_release
1422 EOF
1423 }
1424  ;;
1425
1426             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1427       *-sunos4.0*         ) opsys=sunos4-0      ;;
1428       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1429       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1430       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1431       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1432       *-mach*             ) opsys=mach-bsd4-3   ;;
1433       *                   ) opsys=bsd4-2        ;;
1434     esac
1435
1436     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1437
1438         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1439   ;;
1440
1441     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1442
1443     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1444   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1445
1446     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1447
1448     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1449
1450     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1451       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1452
1453     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1454
1455     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1456
1457     vax-dec-* )
1458     case "$canonical" in
1459       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1460       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1461       *-mach* )                         opsys=mach-bsd4-3 ;;
1462     esac
1463   ;;
1464
1465     ns16k-whitechapel-* ) machine=mg1 ;;
1466
1467     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1468
1469     i[3-9]86-*-* )
1470     machine=intel386
1471     case "$canonical" in
1472       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1473       *-isc2.2* )               opsys=isc2-2 ;;
1474       *-isc4.0* )               opsys=isc4-0 ;;
1475       *-isc4.* )                opsys=isc4-1
1476                                 GCC_TEST_OPTIONS=-posix
1477                                 NON_GCC_TEST_OPTIONS=-Xp
1478                                 ;;
1479       *-isc* )                  opsys=isc3-0 ;;
1480       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1481       *-esix* )                 opsys=esix ;;
1482       *-mach* )                 opsys=mach-bsd4-3 ;;
1483       *-xenix* )                opsys=xenix ;;
1484       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1485       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1486       *-bsdi4* )                opsys=bsdos4 ;;
1487       *-bsdi3* )                opsys=bsdos3 ;;
1488       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1489       *-bsdi2* )                opsys=bsdos2 ;;
1490       *-sco3.2v5* )             opsys=sco5 ;;
1491       *-sysv5* )                opsys=sco7 ;;
1492       *-386bsd* )               opsys=386bsd ;;
1493       *-freebsd* )              opsys=freebsd ;;
1494       *-nextstep* )             opsys=nextstep ;;
1495       *-pc-cygwin* )            opsys=cygwin32 ;;
1496       *-pc-mingw* )             opsys=mingw32 ;
1497                                 test -z "$with_tty" && with_tty="no";;
1498           esac
1499   ;;
1500
1501     m68k-*-linux* ) machine=m68k opsys=linux ;;
1502
1503 esac
1504
1505 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1506 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1507
1508 if test -r "${srcdir}/src/m/${machine}.h"; then
1509   machfile="m/${machine}.h"
1510   { test "$extra_verbose" = "yes" && cat << EOF
1511     Defining config_machfile = "$machfile"
1512 EOF
1513 cat >> confdefs.h <<EOF
1514 #define config_machfile "$machfile"
1515 EOF
1516 }
1517
1518 else
1519   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1520   echo "Using configure-time autodetection only."
1521 fi
1522
1523 if test -r "${srcdir}/src/s/${opsys}.h"; then
1524   opsysfile="s/${opsys}.h"
1525   { test "$extra_verbose" = "yes" && cat << EOF
1526     Defining config_opsysfile = "$opsysfile"
1527 EOF
1528 cat >> confdefs.h <<EOF
1529 #define config_opsysfile "$opsysfile"
1530 EOF
1531 }
1532
1533 else
1534   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1535   echo "Using configure-time autodetection only."
1536 fi
1537
1538
1539 if test -z "$dynamic"; then
1540   case "$opsys" in
1541     hpux* | sunos4* ) dynamic=no ;;
1542     *) dynamic=yes ;;
1543   esac
1544 fi
1545 if test "$dynamic" = "yes"; then
1546   case "$opsys" in
1547     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1548     decosf* ) ld_call_shared="-call_shared" ;;
1549   esac
1550 else   case "$opsys" in
1551     sol2 )
1552       echo "Static linking is not supported on Solaris 2."
1553       echo "Rerun configure without specifying --dynamic=no."
1554       exit 1 ;;
1555     linux   ) ld_call_shared="-Bstatic" ;;
1556     decosf* ) ld_call_shared="-non_shared" ;;
1557   esac
1558 fi
1559
1560 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1561
1562 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1563 { test "$extra_verbose" = "yes" && cat << EOF
1564     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1565 EOF
1566 cat >> confdefs.h <<EOF
1567 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1568 EOF
1569 }
1570
1571
1572
1573 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1574 if test "$with_workshop $with_tooltalk" = "yes no"; then
1575   (echo "$progname: Usage error:"
1576 echo " " "--with-workshop requires --with-tooltalk"
1577 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1578 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1579 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1580 fi
1581
1582 if test "$with_workshop" = "yes"; then
1583   { test "$extra_verbose" = "yes" && cat << \EOF
1584     Defining SUNPRO
1585 EOF
1586 cat >> confdefs.h <<\EOF
1587 #define SUNPRO 1
1588 EOF
1589 }
1590
1591   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1592    echo "    xemacs will be linked with \"sunpro.o\""
1593  fi
1594 fi
1595
1596 if test "$with_clash_detection" != "no"; then
1597   { test "$extra_verbose" = "yes" && cat << \EOF
1598     Defining CLASH_DETECTION
1599 EOF
1600 cat >> confdefs.h <<\EOF
1601 #define CLASH_DETECTION 1
1602 EOF
1603 }
1604
1605   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1606    echo "    xemacs will be linked with \"filelock.o\""
1607  fi
1608 fi
1609
1610 test -n "$compiler" && CC="$compiler"
1611 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1612 fi
1613
1614 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1615 if test "${CFLAGS-unset}" != unset
1616   then cflags_specified=yes;
1617   else cflags_specified=no;
1618 fi
1619
1620 xe_save_CFLAGS="$CFLAGS"
1621
1622 # Extract the first word of "gcc", so it can be a program name with args.
1623 set dummy gcc; ac_word=$2
1624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1625 echo "configure:1626: checking for $ac_word" >&5
1626
1627 if test -n "$CC"; then
1628   ac_cv_prog_CC="$CC" # Let the user override the test.
1629 else
1630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1631   ac_dummy="$PATH"
1632   for ac_dir in $ac_dummy; do
1633     test -z "$ac_dir" && ac_dir=.
1634     if test -f $ac_dir/$ac_word; then
1635       ac_cv_prog_CC="gcc"
1636       break
1637     fi
1638   done
1639   IFS="$ac_save_ifs"
1640 fi
1641 CC="$ac_cv_prog_CC"
1642 if test -n "$CC"; then
1643   echo "$ac_t""$CC" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648 if test -z "$CC"; then
1649   # Extract the first word of "cc", so it can be a program name with args.
1650 set dummy cc; ac_word=$2
1651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1652 echo "configure:1653: checking for $ac_word" >&5
1653
1654 if test -n "$CC"; then
1655   ac_cv_prog_CC="$CC" # Let the user override the test.
1656 else
1657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1658   ac_prog_rejected=no
1659   ac_dummy="$PATH"
1660   for ac_dir in $ac_dummy; do
1661     test -z "$ac_dir" && ac_dir=.
1662     if test -f $ac_dir/$ac_word; then
1663       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1664         ac_prog_rejected=yes
1665         continue
1666       fi
1667       ac_cv_prog_CC="cc"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672 if test $ac_prog_rejected = yes; then
1673   # We found a bogon in the path, so make sure we never use it.
1674   set dummy $ac_cv_prog_CC
1675   shift
1676   if test $# -gt 0; then
1677     # We chose a different compiler from the bogus one.
1678     # However, it has the same basename, so the bogon will be chosen
1679     # first if we set CC to just the basename; use the full file name.
1680     shift
1681     set dummy "$ac_dir/$ac_word" "$@"
1682     shift
1683     ac_cv_prog_CC="$@"
1684   fi
1685 fi
1686 fi
1687 CC="$ac_cv_prog_CC"
1688 if test -n "$CC"; then
1689   echo "$ac_t""$CC" 1>&6
1690 else
1691   echo "$ac_t""no" 1>&6
1692 fi
1693
1694   if test -z "$CC"; then
1695     case "`uname -s`" in
1696     *win32* | *WIN32*)
1697       # Extract the first word of "cl", so it can be a program name with args.
1698 set dummy cl; ac_word=$2
1699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1700 echo "configure:1701: checking for $ac_word" >&5
1701
1702 if test -n "$CC"; then
1703   ac_cv_prog_CC="$CC" # Let the user override the test.
1704 else
1705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1706   ac_dummy="$PATH"
1707   for ac_dir in $ac_dummy; do
1708     test -z "$ac_dir" && ac_dir=.
1709     if test -f $ac_dir/$ac_word; then
1710       ac_cv_prog_CC="cl"
1711       break
1712     fi
1713   done
1714   IFS="$ac_save_ifs"
1715 fi
1716 CC="$ac_cv_prog_CC"
1717 if test -n "$CC"; then
1718   echo "$ac_t""$CC" 1>&6
1719 else
1720   echo "$ac_t""no" 1>&6
1721 fi
1722  ;;
1723     esac
1724   fi
1725   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1726 fi
1727
1728 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1729 echo "configure:1730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1730
1731 ac_ext=c
1732 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1733 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1734 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1735 ac_cpp='$CPP '"$xe_cppflags"
1736 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1737 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1738 cross_compiling=no
1739
1740 cat > conftest.$ac_ext << EOF
1741
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744
1745 main(){return(0);}
1746 EOF
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1748   ac_cv_prog_cc_works=yes
1749   # If we can't run a trivial program, we are probably using a cross compiler.
1750   if (./conftest; exit) 2>/dev/null; then
1751     ac_cv_prog_cc_cross=no
1752   else
1753     ac_cv_prog_cc_cross=yes
1754   fi
1755 else
1756   echo "configure: failed program was:" >&5
1757   cat conftest.$ac_ext >&5
1758   ac_cv_prog_cc_works=no
1759 fi
1760 rm -fr conftest*
1761 ac_ext=c
1762 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1763 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1764 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1765 ac_cpp='$CPP '"$xe_cppflags"
1766 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1767 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1768 cross_compiling=no
1769
1770 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1771 if test $ac_cv_prog_cc_works = no; then
1772   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1773 fi
1774 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1775 echo "configure:1776: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1776 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1777 cross_compiling=$ac_cv_prog_cc_cross
1778
1779 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1780 echo "configure:1781: checking whether we are using GNU C" >&5
1781
1782 cat > conftest.c <<EOF
1783 #ifdef __GNUC__
1784   yes;
1785 #endif
1786 EOF
1787 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1788   ac_cv_prog_gcc=yes
1789 else
1790   ac_cv_prog_gcc=no
1791 fi
1792
1793 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1794
1795 if test $ac_cv_prog_gcc = yes; then
1796   GCC=yes
1797 else
1798   GCC=
1799 fi
1800
1801 ac_test_CFLAGS="${CFLAGS+set}"
1802 ac_save_CFLAGS="$CFLAGS"
1803 CFLAGS=
1804 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1805 echo "configure:1806: checking whether ${CC-cc} accepts -g" >&5
1806
1807 echo 'void f(){}' > conftest.c
1808 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1809   ac_cv_prog_cc_g=yes
1810 else
1811   ac_cv_prog_cc_g=no
1812 fi
1813 rm -f conftest*
1814
1815
1816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1817 if test "$ac_test_CFLAGS" = set; then
1818   CFLAGS="$ac_save_CFLAGS"
1819 elif test $ac_cv_prog_cc_g = yes; then
1820   if test "$GCC" = yes; then
1821     CFLAGS="-g -O2"
1822   else
1823     CFLAGS="-g"
1824   fi
1825 else
1826   if test "$GCC" = yes; then
1827     CFLAGS="-O2"
1828   else
1829     CFLAGS=
1830   fi
1831 fi
1832  
1833 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1834   CC=${NON_GNU_CC-cc}
1835   # Extract the first word of "gcc", so it can be a program name with args.
1836 set dummy gcc; ac_word=$2
1837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1838 echo "configure:1839: checking for $ac_word" >&5
1839
1840 if test -n "$CC"; then
1841   ac_cv_prog_CC="$CC" # Let the user override the test.
1842 else
1843   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1844   ac_dummy="$PATH"
1845   for ac_dir in $ac_dummy; do
1846     test -z "$ac_dir" && ac_dir=.
1847     if test -f $ac_dir/$ac_word; then
1848       ac_cv_prog_CC="gcc"
1849       break
1850     fi
1851   done
1852   IFS="$ac_save_ifs"
1853 fi
1854 CC="$ac_cv_prog_CC"
1855 if test -n "$CC"; then
1856   echo "$ac_t""$CC" 1>&6
1857 else
1858   echo "$ac_t""no" 1>&6
1859 fi
1860
1861 if test -z "$CC"; then
1862   # Extract the first word of "cc", so it can be a program name with args.
1863 set dummy cc; ac_word=$2
1864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_word" >&5
1866
1867 if test -n "$CC"; then
1868   ac_cv_prog_CC="$CC" # Let the user override the test.
1869 else
1870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1871   ac_prog_rejected=no
1872   ac_dummy="$PATH"
1873   for ac_dir in $ac_dummy; do
1874     test -z "$ac_dir" && ac_dir=.
1875     if test -f $ac_dir/$ac_word; then
1876       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1877         ac_prog_rejected=yes
1878         continue
1879       fi
1880       ac_cv_prog_CC="cc"
1881       break
1882     fi
1883   done
1884   IFS="$ac_save_ifs"
1885 if test $ac_prog_rejected = yes; then
1886   # We found a bogon in the path, so make sure we never use it.
1887   set dummy $ac_cv_prog_CC
1888   shift
1889   if test $# -gt 0; then
1890     # We chose a different compiler from the bogus one.
1891     # However, it has the same basename, so the bogon will be chosen
1892     # first if we set CC to just the basename; use the full file name.
1893     shift
1894     set dummy "$ac_dir/$ac_word" "$@"
1895     shift
1896     ac_cv_prog_CC="$@"
1897   fi
1898 fi
1899 fi
1900 CC="$ac_cv_prog_CC"
1901 if test -n "$CC"; then
1902   echo "$ac_t""$CC" 1>&6
1903 else
1904   echo "$ac_t""no" 1>&6
1905 fi
1906
1907   if test -z "$CC"; then
1908     case "`uname -s`" in
1909     *win32* | *WIN32*)
1910       # Extract the first word of "cl", so it can be a program name with args.
1911 set dummy cl; ac_word=$2
1912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1913 echo "configure:1914: checking for $ac_word" >&5
1914
1915 if test -n "$CC"; then
1916   ac_cv_prog_CC="$CC" # Let the user override the test.
1917 else
1918   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1919   ac_dummy="$PATH"
1920   for ac_dir in $ac_dummy; do
1921     test -z "$ac_dir" && ac_dir=.
1922     if test -f $ac_dir/$ac_word; then
1923       ac_cv_prog_CC="cl"
1924       break
1925     fi
1926   done
1927   IFS="$ac_save_ifs"
1928 fi
1929 CC="$ac_cv_prog_CC"
1930 if test -n "$CC"; then
1931   echo "$ac_t""$CC" 1>&6
1932 else
1933   echo "$ac_t""no" 1>&6
1934 fi
1935  ;;
1936     esac
1937   fi
1938   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1939 fi
1940
1941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1942 echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1943
1944 ac_ext=c
1945 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1946 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1947 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1948 ac_cpp='$CPP '"$xe_cppflags"
1949 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1950 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1951 cross_compiling=no
1952
1953 cat > conftest.$ac_ext << EOF
1954
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957
1958 main(){return(0);}
1959 EOF
1960 if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1961   ac_cv_prog_cc_works=yes
1962   # If we can't run a trivial program, we are probably using a cross compiler.
1963   if (./conftest; exit) 2>/dev/null; then
1964     ac_cv_prog_cc_cross=no
1965   else
1966     ac_cv_prog_cc_cross=yes
1967   fi
1968 else
1969   echo "configure: failed program was:" >&5
1970   cat conftest.$ac_ext >&5
1971   ac_cv_prog_cc_works=no
1972 fi
1973 rm -fr conftest*
1974 ac_ext=c
1975 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1976 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1977 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1978 ac_cpp='$CPP '"$xe_cppflags"
1979 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1980 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1981 cross_compiling=no
1982
1983 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1984 if test $ac_cv_prog_cc_works = no; then
1985   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1986 fi
1987 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1988 echo "configure:1989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1989 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1990 cross_compiling=$ac_cv_prog_cc_cross
1991
1992 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1993 echo "configure:1994: checking whether we are using GNU C" >&5
1994
1995 cat > conftest.c <<EOF
1996 #ifdef __GNUC__
1997   yes;
1998 #endif
1999 EOF
2000 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2001   ac_cv_prog_gcc=yes
2002 else
2003   ac_cv_prog_gcc=no
2004 fi
2005
2006 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2007
2008 if test $ac_cv_prog_gcc = yes; then
2009   GCC=yes
2010 else
2011   GCC=
2012 fi
2013
2014 ac_test_CFLAGS="${CFLAGS+set}"
2015 ac_save_CFLAGS="$CFLAGS"
2016 CFLAGS=
2017 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether ${CC-cc} accepts -g" >&5
2019
2020 echo 'void f(){}' > conftest.c
2021 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2022   ac_cv_prog_cc_g=yes
2023 else
2024   ac_cv_prog_cc_g=no
2025 fi
2026 rm -f conftest*
2027
2028
2029 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2030 if test "$ac_test_CFLAGS" = set; then
2031   CFLAGS="$ac_save_CFLAGS"
2032 elif test $ac_cv_prog_cc_g = yes; then
2033   if test "$GCC" = yes; then
2034     CFLAGS="-g -O2"
2035   else
2036     CFLAGS="-g"
2037   fi
2038 else
2039   if test "$GCC" = yes; then
2040     CFLAGS="-O2"
2041   else
2042     CFLAGS=
2043   fi
2044 fi
2045
2046 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2047   CC=gcc
2048   # Extract the first word of "gcc", so it can be a program name with args.
2049 set dummy gcc; ac_word=$2
2050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2051 echo "configure:2052: checking for $ac_word" >&5
2052
2053 if test -n "$CC"; then
2054   ac_cv_prog_CC="$CC" # Let the user override the test.
2055 else
2056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2057   ac_dummy="$PATH"
2058   for ac_dir in $ac_dummy; do
2059     test -z "$ac_dir" && ac_dir=.
2060     if test -f $ac_dir/$ac_word; then
2061       ac_cv_prog_CC="gcc"
2062       break
2063     fi
2064   done
2065   IFS="$ac_save_ifs"
2066 fi
2067 CC="$ac_cv_prog_CC"
2068 if test -n "$CC"; then
2069   echo "$ac_t""$CC" 1>&6
2070 else
2071   echo "$ac_t""no" 1>&6
2072 fi
2073
2074 if test -z "$CC"; then
2075   # Extract the first word of "cc", so it can be a program name with args.
2076 set dummy cc; ac_word=$2
2077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2078 echo "configure:2079: checking for $ac_word" >&5
2079
2080 if test -n "$CC"; then
2081   ac_cv_prog_CC="$CC" # Let the user override the test.
2082 else
2083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2084   ac_prog_rejected=no
2085   ac_dummy="$PATH"
2086   for ac_dir in $ac_dummy; do
2087     test -z "$ac_dir" && ac_dir=.
2088     if test -f $ac_dir/$ac_word; then
2089       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2090         ac_prog_rejected=yes
2091         continue
2092       fi
2093       ac_cv_prog_CC="cc"
2094       break
2095     fi
2096   done
2097   IFS="$ac_save_ifs"
2098 if test $ac_prog_rejected = yes; then
2099   # We found a bogon in the path, so make sure we never use it.
2100   set dummy $ac_cv_prog_CC
2101   shift
2102   if test $# -gt 0; then
2103     # We chose a different compiler from the bogus one.
2104     # However, it has the same basename, so the bogon will be chosen
2105     # first if we set CC to just the basename; use the full file name.
2106     shift
2107     set dummy "$ac_dir/$ac_word" "$@"
2108     shift
2109     ac_cv_prog_CC="$@"
2110   fi
2111 fi
2112 fi
2113 CC="$ac_cv_prog_CC"
2114 if test -n "$CC"; then
2115   echo "$ac_t""$CC" 1>&6
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119
2120   if test -z "$CC"; then
2121     case "`uname -s`" in
2122     *win32* | *WIN32*)
2123       # Extract the first word of "cl", so it can be a program name with args.
2124 set dummy cl; ac_word=$2
2125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2126 echo "configure:2127: checking for $ac_word" >&5
2127
2128 if test -n "$CC"; then
2129   ac_cv_prog_CC="$CC" # Let the user override the test.
2130 else
2131   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2132   ac_dummy="$PATH"
2133   for ac_dir in $ac_dummy; do
2134     test -z "$ac_dir" && ac_dir=.
2135     if test -f $ac_dir/$ac_word; then
2136       ac_cv_prog_CC="cl"
2137       break
2138     fi
2139   done
2140   IFS="$ac_save_ifs"
2141 fi
2142 CC="$ac_cv_prog_CC"
2143 if test -n "$CC"; then
2144   echo "$ac_t""$CC" 1>&6
2145 else
2146   echo "$ac_t""no" 1>&6
2147 fi
2148  ;;
2149     esac
2150   fi
2151   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2152 fi
2153
2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2156
2157 ac_ext=c
2158 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2159 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2160 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2161 ac_cpp='$CPP '"$xe_cppflags"
2162 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2163 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2164 cross_compiling=no
2165
2166 cat > conftest.$ac_ext << EOF
2167
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170
2171 main(){return(0);}
2172 EOF
2173 if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2174   ac_cv_prog_cc_works=yes
2175   # If we can't run a trivial program, we are probably using a cross compiler.
2176   if (./conftest; exit) 2>/dev/null; then
2177     ac_cv_prog_cc_cross=no
2178   else
2179     ac_cv_prog_cc_cross=yes
2180   fi
2181 else
2182   echo "configure: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   ac_cv_prog_cc_works=no
2185 fi
2186 rm -fr conftest*
2187 ac_ext=c
2188 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2189 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2190 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2191 ac_cpp='$CPP '"$xe_cppflags"
2192 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2193 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2194 cross_compiling=no
2195
2196 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2197 if test $ac_cv_prog_cc_works = no; then
2198   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2199 fi
2200 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2201 echo "configure:2202: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2202 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2203 cross_compiling=$ac_cv_prog_cc_cross
2204
2205 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2206 echo "configure:2207: checking whether we are using GNU C" >&5
2207
2208 cat > conftest.c <<EOF
2209 #ifdef __GNUC__
2210   yes;
2211 #endif
2212 EOF
2213 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2214   ac_cv_prog_gcc=yes
2215 else
2216   ac_cv_prog_gcc=no
2217 fi
2218
2219 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2220
2221 if test $ac_cv_prog_gcc = yes; then
2222   GCC=yes
2223 else
2224   GCC=
2225 fi
2226
2227 ac_test_CFLAGS="${CFLAGS+set}"
2228 ac_save_CFLAGS="$CFLAGS"
2229 CFLAGS=
2230 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2231 echo "configure:2232: checking whether ${CC-cc} accepts -g" >&5
2232
2233 echo 'void f(){}' > conftest.c
2234 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2235   ac_cv_prog_cc_g=yes
2236 else
2237   ac_cv_prog_cc_g=no
2238 fi
2239 rm -f conftest*
2240
2241
2242 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2243 if test "$ac_test_CFLAGS" = set; then
2244   CFLAGS="$ac_save_CFLAGS"
2245 elif test $ac_cv_prog_cc_g = yes; then
2246   if test "$GCC" = yes; then
2247     CFLAGS="-g -O2"
2248   else
2249     CFLAGS="-g"
2250   fi
2251 else
2252   if test "$GCC" = yes; then
2253     CFLAGS="-O2"
2254   else
2255     CFLAGS=
2256   fi
2257 fi
2258
2259 fi
2260 CFLAGS="$xe_save_CFLAGS"
2261
2262
2263 test -n "$CPP" -a -d "$CPP" && CPP=
2264
2265 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2266
2267 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2268 echo "configure:2269: checking how to run the C preprocessor" >&5
2269 # On Suns, sometimes $CPP names a directory.
2270 if test -n "$CPP" && test -d "$CPP"; then
2271   CPP=
2272 fi
2273 if test -z "$CPP"; then
2274
2275   # This must be in double quotes, not single quotes, because CPP may get
2276   # substituted into the Makefile and "${CC-cc}" will confuse make.
2277   CPP="${CC-cc} -E"
2278   # On the NeXT, cc -E runs the code through the compiler's parser,
2279   # not just through cpp.
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <assert.h>
2284 Syntax Error
2285 EOF
2286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2287 { (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2289 if test -z "$ac_err"; then
2290   :
2291 else
2292   echo "$ac_err" >&5
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   CPP="${CC-cc} -E -traditional-cpp"
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #include <assert.h>
2301 Syntax Error
2302 EOF
2303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2304 { (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2306 if test -z "$ac_err"; then
2307   :
2308 else
2309   echo "$ac_err" >&5
2310   echo "configure: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   rm -rf conftest*
2313   CPP="${CC-cc} -nologo -E"
2314   cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #include <assert.h>
2318 Syntax Error
2319 EOF
2320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2321 { (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2323 if test -z "$ac_err"; then
2324   :
2325 else
2326   echo "$ac_err" >&5
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   CPP=/lib/cpp
2331 fi
2332 rm -f conftest*
2333 fi
2334 rm -f conftest*
2335 fi
2336 rm -f conftest*
2337   ac_cv_prog_CPP="$CPP"
2338   CPP="$ac_cv_prog_CPP"
2339 else
2340   ac_cv_prog_CPP="$CPP"
2341 fi
2342 echo "$ac_t""$CPP" 1>&6
2343
2344
2345
2346 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2347 echo "configure:2348: checking for AIX" >&5
2348 cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #ifdef _AIX
2352   yes
2353 #endif
2354
2355 EOF
2356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2357   egrep "yes" >/dev/null 2>&1; then
2358   rm -rf conftest*
2359   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2360     Defining _ALL_SOURCE
2361 EOF
2362 cat >> confdefs.h <<\EOF
2363 #define _ALL_SOURCE 1
2364 EOF
2365 }
2366
2367 else
2368   rm -rf conftest*
2369   echo "$ac_t""no" 1>&6
2370 fi
2371 rm -f conftest*
2372
2373  
2374
2375 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2376 echo "configure:2377: checking for GNU libc" >&5
2377 cat > conftest.$ac_ext <<EOF
2378 #line 2379 "configure"
2379 #include "confdefs.h"
2380 #include <features.h>
2381 int main() {
2382
2383 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2384 #error Not a GNU libc system :-(
2385 ******* ======= ******** &&&&&&&&
2386 #endif
2387
2388 ; return 0; }
2389 EOF
2390 if { (eval echo configure:2391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2391   rm -rf conftest*
2392   have_glibc=yes
2393 else
2394   echo "configure: failed program was:" >&5
2395   cat conftest.$ac_ext >&5
2396   rm -rf conftest*
2397   have_glibc=no
2398 fi
2399 rm -f conftest*
2400 echo "$ac_t""$have_glibc" 1>&6
2401 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2402     Defining _GNU_SOURCE
2403 EOF
2404 cat >> confdefs.h <<\EOF
2405 #define _GNU_SOURCE 1
2406 EOF
2407 }
2408
2409
2410 case "$opsys" in
2411   sol2)
2412    { test "$extra_verbose" = "yes" && cat << \EOF
2413     Defining __EXTENSIONS__
2414 EOF
2415 cat >> confdefs.h <<\EOF
2416 #define __EXTENSIONS__ 1
2417 EOF
2418 }
2419
2420       if test "$os_release" -ge 55; then
2421      { test "$extra_verbose" = "yes" && cat << \EOF
2422     Defining _XOPEN_SOURCE = 500
2423 EOF
2424 cat >> confdefs.h <<\EOF
2425 #define _XOPEN_SOURCE 500
2426 EOF
2427 }
2428
2429      { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining _XOPEN_SOURCE_EXTENDED
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define _XOPEN_SOURCE_EXTENDED 1
2434 EOF
2435 }
2436
2437    fi ;;
2438   linux)
2439     { test "$extra_verbose" = "yes" && cat << \EOF
2440     Defining _POSIX_C_SOURCE = 199506L
2441 EOF
2442 cat >> confdefs.h <<\EOF
2443 #define _POSIX_C_SOURCE 199506L
2444 EOF
2445 }
2446
2447     { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining _XOPEN_SOURCE = 500
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define _XOPEN_SOURCE 500
2452 EOF
2453 }
2454
2455     { test "$extra_verbose" = "yes" && cat << \EOF
2456     Defining _XOPEN_SOURCE_EXTENDED
2457 EOF
2458 cat >> confdefs.h <<\EOF
2459 #define _XOPEN_SOURCE_EXTENDED 1
2460 EOF
2461 }
2462
2463     ;;
2464 esac
2465
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 int main () {
2470 #if defined __SUNPRO_C
2471 return 11;
2472 #elif defined __DECC
2473 return 12;
2474 #elif defined __USLC__ && defined __SCO_VERSION__
2475 return 13;
2476 #else
2477 return 0;
2478 #endif
2479 }
2480 EOF
2481 if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2482 then
2483   :
2484 else
2485   conftest_rc="$?"
2486   echo "configure: failed program was:" >&5
2487   cat conftest.$ac_ext >&5
2488   rm -fr conftest*
2489   case "$conftest_rc" in
2490   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2491   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2492   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2493 esac
2494 fi
2495 rm -fr conftest*
2496
2497
2498
2499
2500 echo "Extracting information from the machine- and system-dependent headers..."
2501
2502 tempcname="conftest.c"
2503
2504
2505
2506 cat > $tempcname < confdefs.h
2507 cat >> $tempcname <<EOF
2508 #define NOT_C_CODE
2509 #define C_SWITCH_SITE
2510 #define C_SWITCH_X_SITE
2511 #define LD_SWITCH_SITE
2512 #define LD_SWITCH_X_SITE
2513 #define LD_SWITCH_X_SITE_AUX
2514 #define OS_RELEASE $os_release
2515
2516 #ifdef config_opsysfile
2517 #include "$srcdir/src/$opsysfile"
2518 #endif
2519
2520 #ifdef config_machfile
2521 #include "$srcdir/src/$machfile"
2522 #endif
2523
2524 #ifndef LIBS_MACHINE
2525 #define LIBS_MACHINE
2526 #endif
2527 configure___ libs_machine=LIBS_MACHINE
2528
2529 #ifndef LIBS_SYSTEM
2530 #define LIBS_SYSTEM
2531 #endif
2532 configure___ libs_system=LIBS_SYSTEM
2533
2534 #ifndef LIBS_TERMCAP
2535 #define LIBS_TERMCAP
2536 #endif
2537 configure___ libs_termcap=LIBS_TERMCAP
2538
2539 #ifndef LIB_STANDARD
2540 #define LIB_STANDARD
2541 #endif
2542 configure___ libs_standard=LIB_STANDARD
2543
2544
2545 #ifndef OBJECTS_MACHINE
2546 #define OBJECTS_MACHINE
2547 #endif
2548 configure___ objects_machine=OBJECTS_MACHINE
2549
2550 #ifndef OBJECTS_SYSTEM
2551 #define OBJECTS_SYSTEM
2552 #endif
2553 configure___ objects_system=OBJECTS_SYSTEM
2554
2555
2556 #ifndef C_SWITCH_MACHINE
2557 #define C_SWITCH_MACHINE
2558 #endif
2559 configure___ c_switch_machine=C_SWITCH_MACHINE
2560
2561 #ifndef C_SWITCH_SYSTEM
2562 #define C_SWITCH_SYSTEM
2563 #endif
2564 configure___ c_switch_system=C_SWITCH_SYSTEM
2565
2566
2567 #ifndef LD_SWITCH_MACHINE
2568 #define LD_SWITCH_MACHINE
2569 #endif
2570 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2571
2572 #ifndef LD_SWITCH_SYSTEM
2573 #define LD_SWITCH_SYSTEM
2574 #endif
2575 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2576
2577
2578 #ifndef UNEXEC
2579 #define UNEXEC "unexec.o"
2580 #endif
2581 configure___ unexec=UNEXEC
2582
2583
2584 #ifndef LD_SWITCH_SHARED
2585 #define LD_SWITCH_SHARED "-c"
2586 #endif
2587 configure___ ld_switch_shared=LD_SWITCH_SHARED
2588
2589
2590 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2591 configure___ ordinary_ld=ORDINARY_LD
2592
2593 #ifdef ORDINARY_LINK
2594 #define LD ORDINARY_LD
2595 #else /* no ORDINARY LINK */
2596 #ifdef COFF_ENCAPSULATE
2597 #define LD "\$(CC) -nostdlib"
2598 #else /* not COFF_ENCAPSULATE */
2599 #ifdef LINKER
2600 #define LD LINKER
2601 #else /* ! defined (LINKER) */
2602 #define LD "ld"
2603 #endif /* ! defined (LINKER) */
2604 #endif /* ! defined (COFF_ENCAPSULATE) */
2605 #endif /* not ORDINARY_LINK */
2606 configure___ ld=LD
2607
2608 #ifndef LIB_GCC
2609 #define LIB_GCC
2610 #endif
2611 configure___ lib_gcc=LIB_GCC
2612
2613 #ifndef LD_TEXT_START_ADDR
2614 #define LD_TEXT_START_ADDR
2615 #endif
2616 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2617
2618
2619 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2620 #ifdef NO_REMAP
2621 #ifdef COFF_ENCAPSULATE
2622 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2623 #else /* ! defined (COFF_ENCAPSULATE) */
2624 #define START_FILES "pre-crt0.o /lib/crt0.o"
2625 #endif /* ! defined (COFF_ENCAPSULATE) */
2626 #else /* ! defined (NO_REMAP) */
2627 #define START_FILES "ecrt0.o"
2628 #endif /* ! defined (NO_REMAP) */
2629 #endif /* no ORDINARY_LINK */
2630 #ifndef START_FILES
2631 #define START_FILES
2632 #endif
2633 configure___ start_files=START_FILES
2634
2635 #ifdef ORDINARY_LINK
2636 configure___ ordinary_link=yes
2637 #else
2638 configure___ ordinary_link=no
2639 #endif
2640
2641 #ifdef SYSTEM_MALLOC
2642 configure___ system_malloc=yes
2643 #else
2644 configure___ system_malloc=no
2645 #endif
2646
2647 #ifdef TERMINFO
2648 configure___ have_terminfo=yes
2649 #else
2650 configure___ have_terminfo=no
2651 #endif
2652
2653 #ifdef MAIL_USE_FLOCK
2654 configure___ mail_use_flock=yes
2655 #else
2656 configure___ mail_use_flock=no
2657 #endif
2658
2659 #ifdef MAIL_USE_LOCKF
2660 configure___ mail_use_lockf=yes
2661 #else
2662 configure___ mail_use_lockf=no
2663 #endif
2664
2665 #ifdef MAIL_USE_LOCKING
2666 configure___ mail_use_locking=yes
2667 #else
2668 configure___ mail_use_locking=no
2669 #endif
2670
2671 #ifdef HAVE_WIN32_PROCESSES
2672 configure___ win32_processes=yes
2673 #else
2674 configure___ win32_processes=no
2675 #endif
2676
2677 EOF
2678
2679 CPP=`eval "echo $CPP $CPPFLAGS"`
2680 eval `$CPP -Isrc $tempcname \
2681         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2682
2683 rm $tempcname
2684
2685 if test "$pdump" = "yes"; then
2686   ordinary_link="yes"
2687   ld="${ordinary_ld}"
2688   start_files=
2689   libs_standard=
2690   unexec=
2691   lib_gcc=
2692 fi
2693
2694 test "$extra_verbose" = "yes" && \
2695   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 ""
2696
2697 case "$opsys" in mingw* | cygwin*)
2698   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2699   cygwin_include=`eval "dirname $cygwin_include"` ;
2700   cygwin_include="-I$cygwin_include/../include" ;
2701   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2702   case "$opsys" in mingw*)
2703     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2704   esac
2705   ;;
2706 esac
2707
2708 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2709
2710
2711 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2712
2713 if test "$__USLC__" = yes; then
2714   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2715 echo "configure:2716: checking for whether the -Kalloca compiler flag is needed" >&5
2716   need_kalloca=no
2717   cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720
2721 int main() {
2722 void *x = alloca(4);
2723 ; return 0; }
2724 EOF
2725 if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2726   rm -rf conftest*
2727   :
2728 else
2729   echo "configure: failed program was:" >&5
2730   cat conftest.$ac_ext >&5
2731   rm -rf conftest*
2732   
2733     xe_save_c_switch_system="$c_switch_system"
2734     c_switch_system="$c_switch_system -Kalloca"
2735     cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738
2739 int main() {
2740 void *x = alloca(4);
2741 ; return 0; }
2742 EOF
2743 if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744   rm -rf conftest*
2745    need_kalloca=yes 
2746 else
2747   echo "configure: failed program was:" >&5
2748   cat conftest.$ac_ext >&5
2749 fi
2750 rm -f conftest*
2751     c_switch_system="$xe_save_c_switch_system"
2752 fi
2753 rm -f conftest*
2754   echo "$ac_t""$need_kalloca" 1>&6
2755   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2756 fi
2757
2758 if test "$cflags_specified" = "no"; then
2759       if   test "$GCC" = "yes"; then
2760     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2761             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2762               elif test "$__SUNPRO_C" = "yes"; then
2763     case "$opsys" in
2764       sol2    ) CFLAGS="-v -xO4" ;;
2765       sunos4* ) CFLAGS="-xO2";;
2766     esac
2767   elif test "$__DECC" = "yes"; then
2768     CFLAGS="-O3"
2769   elif test "$CC" = "xlc"; then
2770     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2771     else
2772     CFLAGS="-O" ;  fi
2773 fi
2774
2775 if test "$GCC" = "yes"; then
2776 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2777 echo "configure:2778: checking for buggy gcc versions" >&5
2778 GCC_VERSION=`$CC --version`
2779 case `uname -s`:`uname -m`:$GCC_VERSION in
2780                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2781                         case "$CFLAGS" in
2782             *-O2*|*-O3*)
2783                 case "$CFLAGS" in
2784                     *-fno-schedule-insns*) ;;
2785                     *)
2786                         echo "$ac_t""yes" 1>&6
2787                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2788                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2789                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2790                         ;;
2791                 esac
2792                 ;;
2793         esac
2794         ;;
2795                     Linux:alpha:egcs-2.91.*)
2796         echo "$ac_t""yes" 1>&6
2797         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2798         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2799         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2800         ;;
2801     *:i*86*:2.7.2*)
2802         case "$CFLAGS" in
2803             *-O2*|*-O3*)
2804                 case "$GCC_VERSION" in
2805                     2.7.2)
2806                         case "$CFLAGS" in
2807                             *-fno-strength-reduce*) ;;
2808                             *)
2809                                 echo "$ac_t""yes" 1>&6
2810                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2811                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2812                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2813                                 ;;
2814                         esac
2815                         ;;
2816                 esac
2817                 case "$CFLAGS" in
2818                  *-fno-caller-saves*) ;;
2819                  *)
2820                     echo "$ac_t""yes" 1>&6
2821                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2822                     echo "configure: warning: -fno-caller-saves." 1>&2
2823                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2824                     ;;
2825                 esac
2826                 ;;
2827         esac
2828         ;;
2829 esac
2830 echo "$ac_t""no" 1>&6
2831 fi
2832
2833
2834 if test "$GCC" = "yes"; then
2835   set x $ld_switch_system; shift; ld_switch_system=""
2836   while test -n "$1"; do
2837     case $1 in
2838       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2839       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2840       -Xlinker* ) ;;
2841       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2842     esac
2843     shift
2844   done
2845 fi
2846
2847 if test "$GCC" = "yes"; then
2848   set x $ld_switch_machine; shift; ld_switch_machine=""
2849   while test -n "$1"; do
2850     case $1 in
2851       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2852       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2853       -Xlinker* ) ;;
2854       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2855     esac
2856     shift
2857   done
2858 fi
2859
2860 if test "$GCC" = "yes"; then
2861   set x $LDFLAGS; shift; LDFLAGS=""
2862   while test -n "$1"; do
2863     case $1 in
2864       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2865       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2866       -Xlinker* ) ;;
2867       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2868     esac
2869     shift
2870   done
2871 fi
2872
2873 if test "$GCC" = "yes"; then
2874   set x $ld_call_shared; shift; ld_call_shared=""
2875   while test -n "$1"; do
2876     case $1 in
2877       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2878       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2879       -Xlinker* ) ;;
2880       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2881     esac
2882     shift
2883   done
2884 fi
2885
2886 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2887    echo "    xemacs will be linked with \"$objects_machine\""
2888  fi
2889 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2890    echo "    xemacs will be linked with \"$objects_system\""
2891  fi
2892 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2893    echo "    xemacs will be linked with \"$unexec\""
2894  fi
2895 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2896    echo "    xemacs will be linked with \"dumper.o\""
2897  fi
2898
2899 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2900 echo "configure:2901: checking for dynodump" >&5
2901 if test "$unexec" != "unexsol2.o"; then
2902   echo "$ac_t""no" 1>&6
2903 else
2904   echo "$ac_t""yes" 1>&6
2905   { test "$extra_verbose" = "yes" && cat << \EOF
2906     Defining DYNODUMP
2907 EOF
2908 cat >> confdefs.h <<\EOF
2909 #define DYNODUMP 1
2910 EOF
2911 }
2912
2913   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2914   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2915   case "$machine" in
2916     sparc   ) dynodump_arch=sparc ;;
2917     *86*    ) dynodump_arch=i386  ;;
2918     powerpc ) dynodump_arch=ppc   ;;
2919   esac
2920     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
2921 fi
2922
2923
2924 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2925
2926 if test "$unexec" = "unexaix.o"; then
2927   if   test "$dynamic" = "no"; then
2928   start_flags="-Wl,-bnso,-bnodelcsect"
2929   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2930   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2931     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2932   done
2933   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2934     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2935   done
2936   
2937 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2938 echo "configure:2939: checking for terminateAndUnload in -lC" >&5
2939 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2940
2941 xe_check_libs=" -lC "
2942 cat > conftest.$ac_ext <<EOF
2943 #line 2944 "configure"
2944 #include "confdefs.h"
2945 /* Override any gcc2 internal prototype to avoid an error.  */
2946 /* We use char because int might match the return type of a gcc2
2947     builtin and then its argument prototype would still apply.  */
2948 char terminateAndUnload();
2949
2950 int main() {
2951 terminateAndUnload()
2952 ; return 0; }
2953 EOF
2954 if { (eval echo configure:2955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2955   rm -rf conftest*
2956   eval "ac_cv_lib_$ac_lib_var=yes"
2957 else
2958   echo "configure: failed program was:" >&5
2959   cat conftest.$ac_ext >&5
2960   rm -rf conftest*
2961   eval "ac_cv_lib_$ac_lib_var=no"
2962 fi
2963 rm -f conftest*
2964 xe_check_libs=""
2965
2966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2967   echo "$ac_t""yes" 1>&6
2968   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2969 else
2970   echo "$ac_t""no" 1>&6
2971 fi
2972
2973
2974   fi
2975 elif test -n "$ld_text_start_addr"; then
2976   start_flags="-T $ld_text_start_addr -e __start"
2977 fi
2978
2979
2980
2981
2982 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2983  test -z "$linker" &&  linker='$(CC) -nostdlib'
2984  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2985 fi
2986 test "$GCC" != "yes" && lib_gcc=
2987
2988
2989
2990
2991
2992 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2993 if test -n "$site_libraries"; then
2994   for arg in $site_libraries; do
2995     case "$arg" in
2996      -* ) ;;
2997      * ) test -d "$arg" || \
2998            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2999        arg="-L${arg}" ;;
3000     esac
3001     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3002   done
3003 fi
3004
3005 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3006 if test -n "$site_includes"; then
3007   for arg in $site_includes; do
3008     case "$arg" in
3009       -* ) ;;
3010       * ) test -d "$arg" || \
3011            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3012       arg="-I${arg}" ;;
3013     esac
3014     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3015   done
3016 fi
3017
3018 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3019 if test -n "$site_prefixes"; then
3020   for dir in $site_prefixes; do
3021     lib_dir="${dir}/lib"
3022     inc_dir="${dir}/include"
3023     if test ! -d "$dir"; then
3024       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3025     elif test ! -d "$lib_dir"; then
3026       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3027     else
3028       if test -d "$inc_dir"; then
3029         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
3030       fi
3031       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
3032     fi
3033   done
3034 fi
3035
3036
3037 for dir in "/usr/ccs/lib"; do
3038   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3039 done
3040
3041 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3042 if test -n "$site_runtime_libraries"; then
3043   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3044   export LD_RUN_PATH
3045 fi
3046
3047
3048
3049
3050
3051 if test -n "$add_runtime_path"; then :;
3052 elif test "$dynamic" = "no"; then add_runtime_path=no
3053 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3054 else case "$opsys" in
3055        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3056        * ) add_runtime_path=no ;;
3057      esac
3058 fi
3059
3060 if test "$add_runtime_path" = "yes"; then
3061       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3062 echo "configure:3063: checking "for runtime libraries flag"" >&5
3063   case "$opsys" in
3064     sol2 ) dash_r="-R" ;;
3065     decosf* | linux* | irix*) dash_r="-rpath " ;;
3066     *)
3067       dash_r=""
3068       for try_dash_r in "-R" "-R " "-rpath "; do
3069         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3070         
3071 if test "$GCC" = "yes"; then
3072   set x $xe_check_libs; shift; xe_check_libs=""
3073   while test -n "$1"; do
3074     case $1 in
3075       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3076       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3077       -Xlinker* ) ;;
3078       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3079     esac
3080     shift
3081   done
3082 fi
3083         cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086
3087 int main() {
3088
3089 ; return 0; }
3090 EOF
3091 if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3092   rm -rf conftest*
3093   dash_r="$try_dash_r"
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097 fi
3098 rm -f conftest*
3099         xe_check_libs=""
3100         test -n "$dash_r" && break
3101       done ;;
3102   esac
3103   if test -n "$dash_r";
3104     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3105     else echo "$ac_t""NONE" 1>&6
3106   fi
3107 fi
3108
3109 xe_add_unique_runpath_dir='
3110   xe_add_p=yes
3111   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3112   done
3113   if test "$xe_add_p" = "yes"; then
3114     test -n "$runpath" && runpath="${runpath}:"
3115     runpath="${runpath}${xe_runpath_dir}"
3116     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3117   fi'
3118
3119
3120
3121
3122 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3123     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3124   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3125   
3126         runpath="" runpath_dirs=""
3127   if test -n "$LD_RUN_PATH"; then
3128     runpath="$LD_RUN_PATH"
3129   elif test "$GCC" = "yes"; then
3130         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3131     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3132     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3133     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3134       case "$arg" in P,* | -L* | -R* )
3135         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3136           {
3137 xe_runpath_dir="$dir"
3138   test "$xe_runpath_dir" != "/lib"     -a \
3139         "$xe_runpath_dir" != "/usr/lib" -a \
3140         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3141   eval "$xe_add_unique_runpath_dir"
3142 }
3143         done ;;
3144       esac
3145     done
3146     ld_switch_run="$ld_switch_run_save"
3147     rm -f conftest*
3148   else
3149         for arg in $ld_switch_site $ld_switch_x_site; do
3150       case "$arg" in -L*) {
3151 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3152   test "$xe_runpath_dir" != "/lib"     -a \
3153         "$xe_runpath_dir" != "/usr/lib" -a \
3154         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3155   eval "$xe_add_unique_runpath_dir"
3156 };; esac
3157     done
3158         if test "$opsys $need_motif" = "sol2 yes"; then
3159       xe_runpath_dir="/opt/SUNWdt/lib";
3160       eval "$xe_add_unique_runpath_dir";
3161     fi
3162   fi 
3163   if test -n "$runpath"; then
3164     ld_switch_run="${dash_r}${runpath}"
3165     
3166 if test "$GCC" = "yes"; then
3167   set x $ld_switch_run; shift; ld_switch_run=""
3168   while test -n "$1"; do
3169     case $1 in
3170       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3171       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3172       -Xlinker* ) ;;
3173       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3174     esac
3175     shift
3176   done
3177 fi
3178     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3179   fi
3180 fi
3181
3182
3183
3184 GNU_MALLOC=yes
3185 if test "$with_dlmalloc" != "no"; then
3186         doug_lea_malloc=yes
3187 else
3188         doug_lea_malloc=no
3189 fi
3190 after_morecore_hook_exists=yes
3191 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3192 echo "configure:3193: checking for malloc_set_state" >&5
3193
3194 cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 /* System header to define __stub macros and hopefully few prototypes,
3198     which can conflict with char malloc_set_state(); below.  */
3199 #include <assert.h>
3200 /* Override any gcc2 internal prototype to avoid an error.  */
3201 /* We use char because int might match the return type of a gcc2
3202     builtin and then its argument prototype would still apply.  */
3203 char malloc_set_state();
3204
3205 int main() {
3206
3207 /* The GNU C library defines this for functions which it implements
3208     to always fail with ENOSYS.  Some functions are actually named
3209     something starting with __ and the normal name is an alias.  */
3210 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3211 choke me
3212 #else
3213 malloc_set_state();
3214 #endif
3215
3216 ; return 0; }
3217 EOF
3218 if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3219   rm -rf conftest*
3220   eval "ac_cv_func_malloc_set_state=yes"
3221 else
3222   echo "configure: failed program was:" >&5
3223   cat conftest.$ac_ext >&5
3224   rm -rf conftest*
3225   eval "ac_cv_func_malloc_set_state=no"
3226 fi
3227 rm -f conftest*
3228
3229 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3230   echo "$ac_t""yes" 1>&6
3231   :
3232 else
3233   echo "$ac_t""no" 1>&6
3234 doug_lea_malloc=no
3235 fi
3236
3237 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3238 echo "configure:3239: checking whether __after_morecore_hook exists" >&5
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 extern void (* __after_morecore_hook)();
3243 int main() {
3244 __after_morecore_hook = 0
3245 ; return 0; }
3246 EOF
3247 if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3248   rm -rf conftest*
3249   echo "$ac_t""yes" 1>&6
3250 else
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   echo "$ac_t""no" 1>&6
3255    after_morecore_hook_exists=no
3256 fi
3257 rm -f conftest*
3258 if test "$system_malloc" = "yes" ; then
3259   GNU_MALLOC=no
3260   GNU_MALLOC_reason="
3261     - The GNU allocators don't work with this system configuration."
3262 elif test "$with_system_malloc" = "yes" ; then
3263   GNU_MALLOC=no
3264   GNU_MALLOC_reason="
3265     - User chose not to use GNU allocators."
3266 elif test "$with_debug_malloc" = "yes" ; then
3267   GNU_MALLOC=no
3268   GNU_MALLOC_reason="
3269     - User chose to use Debugging Malloc."
3270 fi
3271
3272 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3273   GNU_MALLOC_reason="
3274     - Using Doug Lea's new malloc from the GNU C Library."
3275   { test "$extra_verbose" = "yes" && cat << \EOF
3276     Defining DOUG_LEA_MALLOC
3277 EOF
3278 cat >> confdefs.h <<\EOF
3279 #define DOUG_LEA_MALLOC 1
3280 EOF
3281 }
3282
3283   if test "$after_morecore_hook_exists" = "no" ; then
3284     GNU_MALLOC_reason="
3285     - Using Doug Lea's new malloc from the Linux C Library."
3286     { test "$extra_verbose" = "yes" && cat << \EOF
3287     Defining _NO_MALLOC_WARNING_
3288 EOF
3289 cat >> confdefs.h <<\EOF
3290 #define _NO_MALLOC_WARNING_ 1
3291 EOF
3292 }
3293
3294   fi
3295 fi
3296
3297
3298
3299
3300 # Extract the first word of "ranlib", so it can be a program name with args.
3301 set dummy ranlib; ac_word=$2
3302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3303 echo "configure:3304: checking for $ac_word" >&5
3304
3305 if test -n "$RANLIB"; then
3306   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3307 else
3308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3309   ac_dummy="$PATH"
3310   for ac_dir in $ac_dummy; do
3311     test -z "$ac_dir" && ac_dir=.
3312     if test -f $ac_dir/$ac_word; then
3313       ac_cv_prog_RANLIB="ranlib"
3314       break
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3319 fi
3320 RANLIB="$ac_cv_prog_RANLIB"
3321 if test -n "$RANLIB"; then
3322   echo "$ac_t""$RANLIB" 1>&6
3323 else
3324   echo "$ac_t""no" 1>&6
3325 fi
3326
3327 ac_aux_dir=
3328 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3329   if test -f $ac_dir/install-sh; then
3330     ac_aux_dir=$ac_dir
3331     ac_install_sh="$ac_aux_dir/install-sh -c"
3332     break
3333   elif test -f $ac_dir/install.sh; then
3334     ac_aux_dir=$ac_dir
3335     ac_install_sh="$ac_aux_dir/install.sh -c"
3336     break
3337   fi
3338 done
3339 if test -z "$ac_aux_dir"; then
3340   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3341 fi
3342 ac_config_guess=$ac_aux_dir/config.guess
3343 ac_config_sub=$ac_aux_dir/config.sub
3344 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3345
3346 # Find a good install program.  We prefer a C program (faster),
3347 # so one script is as good as another.  But avoid the broken or
3348 # incompatible versions:
3349 # SysV /etc/install, /usr/sbin/install
3350 # SunOS /usr/etc/install
3351 # IRIX /sbin/install
3352 # AIX /bin/install
3353 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3354 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3355 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3356 # ./install, which can be erroneously created by make from ./install.sh.
3357 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3358 echo "configure:3359: checking for a BSD compatible install" >&5
3359 if test -z "$INSTALL"; then
3360
3361   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3362   for ac_dir in $PATH; do
3363     # Account for people who put trailing slashes in PATH elements.
3364     case "$ac_dir/" in
3365     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3366     *)
3367       # OSF1 and SCO ODT 3.0 have their own names for install.
3368       # Don't use installbsd from OSF since it installs stuff as root
3369       # by default.
3370       for ac_prog in ginstall scoinst install; do
3371         if test -f $ac_dir/$ac_prog; then
3372           if test $ac_prog = install &&
3373             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3374             # AIX install.  It has an incompatible calling convention.
3375             :
3376           else
3377             ac_cv_path_install="$ac_dir/$ac_prog -c"
3378             break 2
3379           fi
3380         fi
3381       done
3382       ;;
3383     esac
3384   done
3385   IFS="$ac_save_IFS"
3386
3387   if test "${ac_cv_path_install+set}" = set; then
3388     INSTALL="$ac_cv_path_install"
3389   else
3390     # As a last resort, use the slow shell script.  We don't cache a
3391     # path for INSTALL within a source directory, because that will
3392     # break other packages using the cache if that directory is
3393     # removed, or if the path is relative.
3394     INSTALL="$ac_install_sh"
3395   fi
3396 fi
3397 echo "$ac_t""$INSTALL" 1>&6
3398
3399 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3400 # It thinks the first close brace ends the variable substitution.
3401 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3402
3403 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3404
3405 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3406
3407 for ac_prog in 'bison -y' byacc
3408 do
3409 # Extract the first word of "$ac_prog", so it can be a program name with args.
3410 set dummy $ac_prog; ac_word=$2
3411 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3412 echo "configure:3413: checking for $ac_word" >&5
3413
3414 if test -n "$YACC"; then
3415   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3416 else
3417   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3418   ac_dummy="$PATH"
3419   for ac_dir in $ac_dummy; do
3420     test -z "$ac_dir" && ac_dir=.
3421     if test -f $ac_dir/$ac_word; then
3422       ac_cv_prog_YACC="$ac_prog"
3423       break
3424     fi
3425   done
3426   IFS="$ac_save_ifs"
3427 fi
3428 YACC="$ac_cv_prog_YACC"
3429 if test -n "$YACC"; then
3430   echo "$ac_t""$YACC" 1>&6
3431 else
3432   echo "$ac_t""no" 1>&6
3433 fi
3434
3435 test -n "$YACC" && break
3436 done
3437 test -n "$YACC" || YACC="yacc"
3438
3439
3440 for ac_hdr in   a.out.h   elf.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/time.h   sys/timeb.h   sys/un.h   ulimit.h   unistd.h 
3441 do
3442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3444 echo "configure:3445: checking for $ac_hdr" >&5
3445
3446 cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 #include <$ac_hdr>
3450 EOF
3451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3452 { (eval echo configure:3453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3454 if test -z "$ac_err"; then
3455   rm -rf conftest*
3456   eval "ac_cv_header_$ac_safe=yes"
3457 else
3458   echo "$ac_err" >&5
3459   echo "configure: failed program was:" >&5
3460   cat conftest.$ac_ext >&5
3461   rm -rf conftest*
3462   eval "ac_cv_header_$ac_safe=no"
3463 fi
3464 rm -f conftest*
3465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3466   echo "$ac_t""yes" 1>&6
3467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3468   { test "$extra_verbose" = "yes" && cat << EOF
3469     Defining $ac_tr_hdr
3470 EOF
3471 cat >> confdefs.h <<EOF
3472 #define $ac_tr_hdr 1
3473 EOF
3474 }
3475  
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479 done
3480
3481 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3482 echo "configure:3483: checking for sys/wait.h that is POSIX.1 compatible" >&5
3483
3484 cat > conftest.$ac_ext <<EOF
3485 #line 3486 "configure"
3486 #include "confdefs.h"
3487 #include <sys/types.h>
3488 #include <sys/wait.h>
3489 #ifndef WEXITSTATUS
3490 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3491 #endif
3492 #ifndef WIFEXITED
3493 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3494 #endif
3495 int main() {
3496 int s;
3497 wait (&s);
3498 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3499 ; return 0; }
3500 EOF
3501 if { (eval echo configure:3502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3502   rm -rf conftest*
3503   ac_cv_header_sys_wait_h=yes
3504 else
3505   echo "configure: failed program was:" >&5
3506   cat conftest.$ac_ext >&5
3507   rm -rf conftest*
3508   ac_cv_header_sys_wait_h=no
3509 fi
3510 rm -f conftest*
3511
3512 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3513 if test $ac_cv_header_sys_wait_h = yes; then
3514   { test "$extra_verbose" = "yes" && cat << \EOF
3515     Defining HAVE_SYS_WAIT_H
3516 EOF
3517 cat >> confdefs.h <<\EOF
3518 #define HAVE_SYS_WAIT_H 1
3519 EOF
3520 }
3521
3522 fi
3523
3524 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3525 echo "configure:3526: checking for ANSI C header files" >&5
3526
3527 cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 #include <stdlib.h>
3531 #include <stdarg.h>
3532 #include <string.h>
3533 #include <float.h>
3534 EOF
3535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3536 { (eval echo configure:3537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3538 if test -z "$ac_err"; then
3539   rm -rf conftest*
3540   ac_cv_header_stdc=yes
3541 else
3542   echo "$ac_err" >&5
3543   echo "configure: failed program was:" >&5
3544   cat conftest.$ac_ext >&5
3545   rm -rf conftest*
3546   ac_cv_header_stdc=no
3547 fi
3548 rm -f conftest*
3549
3550 if test $ac_cv_header_stdc = yes; then
3551   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3552 cat > conftest.$ac_ext <<EOF
3553 #line 3554 "configure"
3554 #include "confdefs.h"
3555 #include <string.h>
3556 EOF
3557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3558   egrep "memchr" >/dev/null 2>&1; then
3559   :
3560 else
3561   rm -rf conftest*
3562   ac_cv_header_stdc=no
3563 fi
3564 rm -f conftest*
3565
3566 fi
3567
3568 if test $ac_cv_header_stdc = yes; then
3569   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573 #include <stdlib.h>
3574 EOF
3575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3576   egrep "free" >/dev/null 2>&1; then
3577   :
3578 else
3579   rm -rf conftest*
3580   ac_cv_header_stdc=no
3581 fi
3582 rm -f conftest*
3583
3584 fi
3585
3586 if test $ac_cv_header_stdc = yes; then
3587   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3588 cat > conftest.$ac_ext <<EOF
3589 #line 3590 "configure"
3590 #include "confdefs.h"
3591 #include <ctype.h>
3592 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3593 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3594 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3595 int main () { int i; for (i = 0; i < 256; i++)
3596 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3597 exit (0); }
3598
3599 EOF
3600 if { (eval echo configure:3601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3601 then
3602   :
3603 else
3604   conftest_rc="$?"
3605   echo "configure: failed program was:" >&5
3606   cat conftest.$ac_ext >&5
3607   rm -fr conftest*
3608   ac_cv_header_stdc=no
3609 fi
3610 rm -fr conftest*
3611 fi
3612
3613 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3614 if test $ac_cv_header_stdc = yes; then
3615   { test "$extra_verbose" = "yes" && cat << \EOF
3616     Defining STDC_HEADERS
3617 EOF
3618 cat >> confdefs.h <<\EOF
3619 #define STDC_HEADERS 1
3620 EOF
3621 }
3622
3623 fi
3624
3625 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3626 echo "configure:3627: checking whether time.h and sys/time.h may both be included" >&5
3627
3628 cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3631 #include <sys/types.h>
3632 #include <sys/time.h>
3633 #include <time.h>
3634 int main() {
3635 struct tm *tp;
3636 ; return 0; }
3637 EOF
3638 if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3639   rm -rf conftest*
3640   ac_cv_header_time=yes
3641 else
3642   echo "configure: failed program was:" >&5
3643   cat conftest.$ac_ext >&5
3644   rm -rf conftest*
3645   ac_cv_header_time=no
3646 fi
3647 rm -f conftest*
3648
3649 echo "$ac_t""$ac_cv_header_time" 1>&6
3650 if test $ac_cv_header_time = yes; then
3651   { test "$extra_verbose" = "yes" && cat << \EOF
3652     Defining TIME_WITH_SYS_TIME
3653 EOF
3654 cat >> confdefs.h <<\EOF
3655 #define TIME_WITH_SYS_TIME 1
3656 EOF
3657 }
3658
3659 fi
3660
3661 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3662 echo "configure:3663: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3663
3664 cat > conftest.$ac_ext <<EOF
3665 #line 3666 "configure"
3666 #include "confdefs.h"
3667 #include <sys/types.h>
3668 #include <signal.h>
3669 /* NetBSD declares sys_siglist in unistd.h.  */
3670 #ifdef HAVE_UNISTD_H
3671 #include <unistd.h>
3672 #endif
3673 int main() {
3674 char *msg = *(sys_siglist + 1);
3675 ; return 0; }
3676 EOF
3677 if { (eval echo configure:3678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3678   rm -rf conftest*
3679   ac_cv_decl_sys_siglist=yes
3680 else
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   ac_cv_decl_sys_siglist=no
3685 fi
3686 rm -f conftest*
3687
3688 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3689 if test $ac_cv_decl_sys_siglist = yes; then
3690   { test "$extra_verbose" = "yes" && cat << \EOF
3691     Defining SYS_SIGLIST_DECLARED
3692 EOF
3693 cat >> confdefs.h <<\EOF
3694 #define SYS_SIGLIST_DECLARED 1
3695 EOF
3696 }
3697
3698 fi
3699
3700
3701
3702 echo $ac_n "checking for utime""... $ac_c" 1>&6
3703 echo "configure:3704: checking for utime" >&5
3704 cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <sys/types.h>
3708 #include <utime.h>
3709 int main() {
3710 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3711 ; return 0; }
3712 EOF
3713 if { (eval echo configure:3714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3714   rm -rf conftest*
3715   echo "$ac_t""yes" 1>&6
3716    { test "$extra_verbose" = "yes" && cat << \EOF
3717     Defining HAVE_UTIME
3718 EOF
3719 cat >> confdefs.h <<\EOF
3720 #define HAVE_UTIME 1
3721 EOF
3722 }
3723
3724 else
3725   echo "configure: failed program was:" >&5
3726   cat conftest.$ac_ext >&5
3727   rm -rf conftest*
3728   echo "$ac_t""no" 1>&6
3729       for ac_func in utimes
3730 do
3731 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3732 echo "configure:3733: checking for $ac_func" >&5
3733
3734 cat > conftest.$ac_ext <<EOF
3735 #line 3736 "configure"
3736 #include "confdefs.h"
3737 /* System header to define __stub macros and hopefully few prototypes,
3738     which can conflict with char $ac_func(); below.  */
3739 #include <assert.h>
3740 /* Override any gcc2 internal prototype to avoid an error.  */
3741 /* We use char because int might match the return type of a gcc2
3742     builtin and then its argument prototype would still apply.  */
3743 char $ac_func();
3744
3745 int main() {
3746
3747 /* The GNU C library defines this for functions which it implements
3748     to always fail with ENOSYS.  Some functions are actually named
3749     something starting with __ and the normal name is an alias.  */
3750 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3751 choke me
3752 #else
3753 $ac_func();
3754 #endif
3755
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3759   rm -rf conftest*
3760   eval "ac_cv_func_$ac_func=yes"
3761 else
3762   echo "configure: failed program was:" >&5
3763   cat conftest.$ac_ext >&5
3764   rm -rf conftest*
3765   eval "ac_cv_func_$ac_func=no"
3766 fi
3767 rm -f conftest*
3768
3769 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3770   echo "$ac_t""yes" 1>&6
3771     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3772   { test "$extra_verbose" = "yes" && cat << EOF
3773     Defining $ac_tr_func
3774 EOF
3775 cat >> confdefs.h <<EOF
3776 #define $ac_tr_func 1
3777 EOF
3778 }
3779  
3780 else
3781   echo "$ac_t""no" 1>&6
3782 fi
3783 done
3784
3785 fi
3786 rm -f conftest*
3787
3788
3789 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3790 echo "configure:3791: checking return type of signal handlers" >&5
3791
3792 cat > conftest.$ac_ext <<EOF
3793 #line 3794 "configure"
3794 #include "confdefs.h"
3795 #include <sys/types.h>
3796 #include <signal.h>
3797 #ifdef signal
3798 #undef signal
3799 #endif
3800 #ifdef __cplusplus
3801 extern "C" void (*signal (int, void (*)(int)))(int);
3802 #else
3803 void (*signal ()) ();
3804 #endif
3805
3806 int main() {
3807 int i;
3808 ; return 0; }
3809 EOF
3810 if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3811   rm -rf conftest*
3812   ac_cv_type_signal=void
3813 else
3814   echo "configure: failed program was:" >&5
3815   cat conftest.$ac_ext >&5
3816   rm -rf conftest*
3817   ac_cv_type_signal=int
3818 fi
3819 rm -f conftest*
3820
3821 echo "$ac_t""$ac_cv_type_signal" 1>&6
3822 { test "$extra_verbose" = "yes" && cat << EOF
3823     Defining RETSIGTYPE = $ac_cv_type_signal
3824 EOF
3825 cat >> confdefs.h <<EOF
3826 #define RETSIGTYPE $ac_cv_type_signal
3827 EOF
3828 }
3829
3830
3831 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3832 echo "configure:3833: checking for size_t" >&5
3833
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 #include <sys/types.h>
3838 #if STDC_HEADERS
3839 #include <stdlib.h>
3840 #include <stddef.h>
3841 #endif
3842 EOF
3843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3844   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3845   rm -rf conftest*
3846   ac_cv_type_size_t=yes
3847 else
3848   rm -rf conftest*
3849   ac_cv_type_size_t=no
3850 fi
3851 rm -f conftest*
3852
3853 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3854 if test $ac_cv_type_size_t = no; then
3855   { test "$extra_verbose" = "yes" && cat << \EOF
3856     Defining size_t = unsigned
3857 EOF
3858 cat >> confdefs.h <<\EOF
3859 #define size_t unsigned
3860 EOF
3861 }
3862
3863 fi
3864
3865 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3866 echo "configure:3867: checking for pid_t" >&5
3867
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <sys/types.h>
3872 #if STDC_HEADERS
3873 #include <stdlib.h>
3874 #include <stddef.h>
3875 #endif
3876 EOF
3877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3878   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3879   rm -rf conftest*
3880   ac_cv_type_pid_t=yes
3881 else
3882   rm -rf conftest*
3883   ac_cv_type_pid_t=no
3884 fi
3885 rm -f conftest*
3886
3887 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3888 if test $ac_cv_type_pid_t = no; then
3889   { test "$extra_verbose" = "yes" && cat << \EOF
3890     Defining pid_t = int
3891 EOF
3892 cat >> confdefs.h <<\EOF
3893 #define pid_t int
3894 EOF
3895 }
3896
3897 fi
3898
3899 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3900 echo "configure:3901: checking for uid_t in sys/types.h" >&5
3901
3902 cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 #include <sys/types.h>
3906 EOF
3907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3908   egrep "uid_t" >/dev/null 2>&1; then
3909   rm -rf conftest*
3910   ac_cv_type_uid_t=yes
3911 else
3912   rm -rf conftest*
3913   ac_cv_type_uid_t=no
3914 fi
3915 rm -f conftest*
3916
3917
3918 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3919 if test $ac_cv_type_uid_t = no; then
3920   { test "$extra_verbose" = "yes" && cat << \EOF
3921     Defining uid_t = int
3922 EOF
3923 cat >> confdefs.h <<\EOF
3924 #define uid_t int
3925 EOF
3926 }
3927
3928   { test "$extra_verbose" = "yes" && cat << \EOF
3929     Defining gid_t = int
3930 EOF
3931 cat >> confdefs.h <<\EOF
3932 #define gid_t int
3933 EOF
3934 }
3935
3936 fi
3937
3938 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3939 echo "configure:3940: checking for mode_t" >&5
3940
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944 #include <sys/types.h>
3945 #if STDC_HEADERS
3946 #include <stdlib.h>
3947 #include <stddef.h>
3948 #endif
3949 EOF
3950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3951   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3952   rm -rf conftest*
3953   ac_cv_type_mode_t=yes
3954 else
3955   rm -rf conftest*
3956   ac_cv_type_mode_t=no
3957 fi
3958 rm -f conftest*
3959
3960 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3961 if test $ac_cv_type_mode_t = no; then
3962   { test "$extra_verbose" = "yes" && cat << \EOF
3963     Defining mode_t = int
3964 EOF
3965 cat >> confdefs.h <<\EOF
3966 #define mode_t int
3967 EOF
3968 }
3969
3970 fi
3971
3972 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3973 echo "configure:3974: checking for off_t" >&5
3974
3975 cat > conftest.$ac_ext <<EOF
3976 #line 3977 "configure"
3977 #include "confdefs.h"
3978 #include <sys/types.h>
3979 #if STDC_HEADERS
3980 #include <stdlib.h>
3981 #include <stddef.h>
3982 #endif
3983 EOF
3984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3985   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3986   rm -rf conftest*
3987   ac_cv_type_off_t=yes
3988 else
3989   rm -rf conftest*
3990   ac_cv_type_off_t=no
3991 fi
3992 rm -f conftest*
3993
3994 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3995 if test $ac_cv_type_off_t = no; then
3996   { test "$extra_verbose" = "yes" && cat << \EOF
3997     Defining off_t = long
3998 EOF
3999 cat >> confdefs.h <<\EOF
4000 #define off_t long
4001 EOF
4002 }
4003
4004 fi
4005
4006 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4007 echo "configure:4008: checking for ssize_t" >&5
4008
4009 cat > conftest.$ac_ext <<EOF
4010 #line 4011 "configure"
4011 #include "confdefs.h"
4012 #include <sys/types.h>
4013 #if STDC_HEADERS
4014 #include <stdlib.h>
4015 #include <stddef.h>
4016 #endif
4017 EOF
4018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4019   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4020   rm -rf conftest*
4021   ac_cv_type_ssize_t=yes
4022 else
4023   rm -rf conftest*
4024   ac_cv_type_ssize_t=no
4025 fi
4026 rm -f conftest*
4027
4028 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4029 if test $ac_cv_type_ssize_t = no; then
4030   { test "$extra_verbose" = "yes" && cat << \EOF
4031     Defining ssize_t = int
4032 EOF
4033 cat >> confdefs.h <<\EOF
4034 #define ssize_t int
4035 EOF
4036 }
4037
4038 fi
4039
4040
4041 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4042 echo "configure:4043: checking for socklen_t" >&5
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 #include <sys/socket.h>
4047 socklen_t x;
4048
4049 int main() {
4050
4051 ; return 0; }
4052 EOF
4053 if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054   rm -rf conftest*
4055   echo "$ac_t""yes" 1>&6
4056 else
4057   echo "configure: failed program was:" >&5
4058   cat conftest.$ac_ext >&5
4059   rm -rf conftest*
4060   
4061 cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064 #include <sys/socket.h>
4065 int accept (int, struct sockaddr *, size_t *);
4066
4067 int main() {
4068
4069 ; return 0; }
4070 EOF
4071 if { (eval echo configure:4072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4072   rm -rf conftest*
4073   
4074 echo "$ac_t""size_t" 1>&6
4075 { test "$extra_verbose" = "yes" && cat << \EOF
4076     Defining socklen_t = size_t
4077 EOF
4078 cat >> confdefs.h <<\EOF
4079 #define socklen_t size_t
4080 EOF
4081 }
4082
4083 else
4084   echo "configure: failed program was:" >&5
4085   cat conftest.$ac_ext >&5
4086   rm -rf conftest*
4087   
4088 echo "$ac_t""int" 1>&6
4089 { test "$extra_verbose" = "yes" && cat << \EOF
4090     Defining socklen_t = int
4091 EOF
4092 cat >> confdefs.h <<\EOF
4093 #define socklen_t int
4094 EOF
4095 }
4096
4097 fi
4098 rm -f conftest*
4099 fi
4100 rm -f conftest*
4101
4102 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4103 echo "configure:4104: checking for struct timeval" >&5
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4107 #ifdef TIME_WITH_SYS_TIME
4108 #include <sys/time.h>
4109 #include <time.h>
4110 #else
4111 #ifdef HAVE_SYS_TIME_H
4112 #include <sys/time.h>
4113 #else
4114 #include <time.h>
4115 #endif
4116 #endif
4117 int main() {
4118 static struct timeval x; x.tv_sec = x.tv_usec;
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   echo "$ac_t""yes" 1>&6
4124   HAVE_TIMEVAL=yes
4125   { test "$extra_verbose" = "yes" && cat << \EOF
4126     Defining HAVE_TIMEVAL
4127 EOF
4128 cat >> confdefs.h <<\EOF
4129 #define HAVE_TIMEVAL 1
4130 EOF
4131 }
4132
4133 else
4134   echo "configure: failed program was:" >&5
4135   cat conftest.$ac_ext >&5
4136   rm -rf conftest*
4137   echo "$ac_t""no" 1>&6
4138    HAVE_TIMEVAL=no
4139 fi
4140 rm -f conftest*
4141
4142 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4143 echo "configure:4144: checking whether struct tm is in sys/time.h or time.h" >&5
4144
4145 cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 #include <sys/types.h>
4149 #include <time.h>
4150 int main() {
4151 struct tm *tp; tp->tm_sec;
4152 ; return 0; }
4153 EOF
4154 if { (eval echo configure:4155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4155   rm -rf conftest*
4156   ac_cv_struct_tm=time.h
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   ac_cv_struct_tm=sys/time.h
4162 fi
4163 rm -f conftest*
4164
4165 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4166 if test $ac_cv_struct_tm = sys/time.h; then
4167   { test "$extra_verbose" = "yes" && cat << \EOF
4168     Defining TM_IN_SYS_TIME
4169 EOF
4170 cat >> confdefs.h <<\EOF
4171 #define TM_IN_SYS_TIME 1
4172 EOF
4173 }
4174
4175 fi
4176
4177 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4178 echo "configure:4179: checking for tm_zone in struct tm" >&5
4179
4180 cat > conftest.$ac_ext <<EOF
4181 #line 4182 "configure"
4182 #include "confdefs.h"
4183 #include <sys/types.h>
4184 #include <$ac_cv_struct_tm>
4185 int main() {
4186 struct tm tm; tm.tm_zone;
4187 ; return 0; }
4188 EOF
4189 if { (eval echo configure:4190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4190   rm -rf conftest*
4191   ac_cv_struct_tm_zone=yes
4192 else
4193   echo "configure: failed program was:" >&5
4194   cat conftest.$ac_ext >&5
4195   rm -rf conftest*
4196   ac_cv_struct_tm_zone=no
4197 fi
4198 rm -f conftest*
4199
4200 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4201 if test "$ac_cv_struct_tm_zone" = yes; then
4202   { test "$extra_verbose" = "yes" && cat << \EOF
4203     Defining HAVE_TM_ZONE
4204 EOF
4205 cat >> confdefs.h <<\EOF
4206 #define HAVE_TM_ZONE 1
4207 EOF
4208 }
4209
4210 else
4211   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4212 echo "configure:4213: checking for tzname" >&5
4213
4214 cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <time.h>
4218 #ifndef tzname /* For SGI.  */
4219 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4220 #endif
4221 int main() {
4222 atoi(*tzname);
4223 ; return 0; }
4224 EOF
4225 if { (eval echo configure:4226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4226   rm -rf conftest*
4227   ac_cv_var_tzname=yes
4228 else
4229   echo "configure: failed program was:" >&5
4230   cat conftest.$ac_ext >&5
4231   rm -rf conftest*
4232   ac_cv_var_tzname=no
4233 fi
4234 rm -f conftest*
4235
4236 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4237   if test $ac_cv_var_tzname = yes; then
4238     { test "$extra_verbose" = "yes" && cat << \EOF
4239     Defining HAVE_TZNAME
4240 EOF
4241 cat >> confdefs.h <<\EOF
4242 #define HAVE_TZNAME 1
4243 EOF
4244 }
4245
4246   fi
4247 fi
4248
4249
4250 echo $ac_n "checking for working const""... $ac_c" 1>&6
4251 echo "configure:4252: checking for working const" >&5
4252
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4256
4257 int main() {
4258
4259 /* Ultrix mips cc rejects this.  */
4260 typedef int charset[2]; const charset x;
4261 /* SunOS 4.1.1 cc rejects this.  */
4262 char const *const *ccp;
4263 char **p;
4264 /* NEC SVR4.0.2 mips cc rejects this.  */
4265 struct point {int x, y;};
4266 static struct point const zero = {0,0};
4267 /* AIX XL C 1.02.0.0 rejects this.
4268    It does not let you subtract one const X* pointer from another in an arm
4269    of an if-expression whose if-part is not a constant expression */
4270 const char *g = "string";
4271 ccp = &g + (g ? g-g : 0);
4272 /* HPUX 7.0 cc rejects these. */
4273 ++ccp;
4274 p = (char**) ccp;
4275 ccp = (char const *const *) p;
4276 { /* SCO 3.2v4 cc rejects this.  */
4277   char *t;
4278   char const *s = 0 ? (char *) 0 : (char const *) 0;
4279
4280   *t++ = 0;
4281 }
4282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4283   int x[] = {25, 17};
4284   const int *foo = &x[0];
4285   ++foo;
4286 }
4287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4288   typedef const int *iptr;
4289   iptr p = 0;
4290   ++p;
4291 }
4292 { /* AIX XL C 1.02.0.0 rejects this saying
4293      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4294   struct s { int j; const int *ap[3]; };
4295   struct s *b; b->j = 5;
4296 }
4297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4298   const int foo = 10;
4299 }
4300
4301 ; return 0; }
4302 EOF
4303 if { (eval echo configure:4304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4304   rm -rf conftest*
4305   ac_cv_c_const=yes
4306 else
4307   echo "configure: failed program was:" >&5
4308   cat conftest.$ac_ext >&5
4309   rm -rf conftest*
4310   ac_cv_c_const=no
4311 fi
4312 rm -f conftest*
4313
4314 echo "$ac_t""$ac_cv_c_const" 1>&6
4315 if test $ac_cv_c_const = no; then
4316   { test "$extra_verbose" = "yes" && cat << \EOF
4317     Defining const = 
4318 EOF
4319 cat >> confdefs.h <<\EOF
4320 #define const 
4321 EOF
4322 }
4323
4324 fi
4325
4326
4327 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4328 echo "configure:4329: checking whether ${MAKE-make} sets \${MAKE}" >&5
4329 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4330
4331 cat > conftestmake <<\EOF
4332 all:
4333         @echo 'ac_maketemp="${MAKE}"'
4334 EOF
4335 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4336 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4337 if test -n "$ac_maketemp"; then
4338   eval ac_cv_prog_make_${ac_make}_set=yes
4339 else
4340   eval ac_cv_prog_make_${ac_make}_set=no
4341 fi
4342 rm -f conftestmake
4343 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4344   echo "$ac_t""yes" 1>&6
4345   SET_MAKE=
4346 else
4347   echo "$ac_t""no" 1>&6
4348   SET_MAKE="MAKE=${MAKE-make}"
4349 fi
4350
4351
4352 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4353 echo "configure:4354: checking whether byte ordering is bigendian" >&5
4354
4355 ac_cv_c_bigendian=unknown
4356 # See if sys/param.h defines the BYTE_ORDER macro.
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 #include <sys/types.h>
4361 #include <sys/param.h>
4362 int main() {
4363
4364 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4365  bogus endian macros
4366 #endif
4367 ; return 0; }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4370   rm -rf conftest*
4371   # It does; now see whether it defined to BIG_ENDIAN or not.
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 #include <sys/types.h>
4376 #include <sys/param.h>
4377 int main() {
4378
4379 #if BYTE_ORDER != BIG_ENDIAN
4380  not big endian
4381 #endif
4382 ; return 0; }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4385   rm -rf conftest*
4386   ac_cv_c_bigendian=yes
4387 else
4388   echo "configure: failed program was:" >&5
4389   cat conftest.$ac_ext >&5
4390   rm -rf conftest*
4391   ac_cv_c_bigendian=no
4392 fi
4393 rm -f conftest*
4394 else
4395   echo "configure: failed program was:" >&5
4396   cat conftest.$ac_ext >&5
4397 fi
4398 rm -f conftest*
4399 if test $ac_cv_c_bigendian = unknown; then
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 main () {
4404   /* Are we little or big endian?  From Harbison&Steele.  */
4405   union
4406   {
4407     long l;
4408     char c[sizeof (long)];
4409   } u;
4410   u.l = 1;
4411   exit (u.c[sizeof (long) - 1] == 1);
4412 }
4413 EOF
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4415 then
4416   ac_cv_c_bigendian=no
4417 else
4418   conftest_rc="$?"
4419   echo "configure: failed program was:" >&5
4420   cat conftest.$ac_ext >&5
4421   rm -fr conftest*
4422   ac_cv_c_bigendian=yes
4423 fi
4424 rm -fr conftest*
4425 fi
4426
4427 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4428 if test $ac_cv_c_bigendian = yes; then
4429   { test "$extra_verbose" = "yes" && cat << \EOF
4430     Defining WORDS_BIGENDIAN
4431 EOF
4432 cat >> confdefs.h <<\EOF
4433 #define WORDS_BIGENDIAN 1
4434 EOF
4435 }
4436
4437 fi
4438
4439
4440 echo $ac_n "checking size of short""... $ac_c" 1>&6
4441 echo "configure:4442: checking size of short" >&5
4442
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 #include <stdio.h>
4447 main()
4448 {
4449   FILE *f=fopen("conftestval", "w");
4450   if (!f) exit(1);
4451   fprintf(f, "%d\n", sizeof(short));
4452   exit(0);
4453 }
4454 EOF
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4456 then
4457   ac_cv_sizeof_short=`cat conftestval`
4458 else
4459   conftest_rc="$?"
4460   echo "configure: failed program was:" >&5
4461   cat conftest.$ac_ext >&5
4462   rm -fr conftest*
4463   ac_cv_sizeof_short=0
4464 fi
4465 rm -fr conftest*
4466 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4467 { test "$extra_verbose" = "yes" && cat << EOF
4468     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4469 EOF
4470 cat >> confdefs.h <<EOF
4471 #define SIZEOF_SHORT $ac_cv_sizeof_short
4472 EOF
4473 }
4474
4475
4476 if test "$ac_cv_sizeof_short" = 0; then
4477   echo ""
4478   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4479   echo "*** PANIC *** Please examine config.log for compilation errors."
4480   exit 1
4481 fi
4482 echo $ac_n "checking size of int""... $ac_c" 1>&6
4483 echo "configure:4484: checking size of int" >&5
4484
4485 cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include <stdio.h>
4489 main()
4490 {
4491   FILE *f=fopen("conftestval", "w");
4492   if (!f) exit(1);
4493   fprintf(f, "%d\n", sizeof(int));
4494   exit(0);
4495 }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4498 then
4499   ac_cv_sizeof_int=`cat conftestval`
4500 else
4501   conftest_rc="$?"
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -fr conftest*
4505   ac_cv_sizeof_int=0
4506 fi
4507 rm -fr conftest*
4508 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4509 { test "$extra_verbose" = "yes" && cat << EOF
4510     Defining SIZEOF_INT = $ac_cv_sizeof_int
4511 EOF
4512 cat >> confdefs.h <<EOF
4513 #define SIZEOF_INT $ac_cv_sizeof_int
4514 EOF
4515 }
4516
4517
4518 echo $ac_n "checking size of long""... $ac_c" 1>&6
4519 echo "configure:4520: checking size of long" >&5
4520
4521 cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524 #include <stdio.h>
4525 main()
4526 {
4527   FILE *f=fopen("conftestval", "w");
4528   if (!f) exit(1);
4529   fprintf(f, "%d\n", sizeof(long));
4530   exit(0);
4531 }
4532 EOF
4533 if { (eval echo configure:4534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4534 then
4535   ac_cv_sizeof_long=`cat conftestval`
4536 else
4537   conftest_rc="$?"
4538   echo "configure: failed program was:" >&5
4539   cat conftest.$ac_ext >&5
4540   rm -fr conftest*
4541   ac_cv_sizeof_long=0
4542 fi
4543 rm -fr conftest*
4544 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4545 { test "$extra_verbose" = "yes" && cat << EOF
4546     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4547 EOF
4548 cat >> confdefs.h <<EOF
4549 #define SIZEOF_LONG $ac_cv_sizeof_long
4550 EOF
4551 }
4552
4553
4554 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4555 echo "configure:4556: checking size of long long" >&5
4556
4557 cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <stdio.h>
4561 main()
4562 {
4563   FILE *f=fopen("conftestval", "w");
4564   if (!f) exit(1);
4565   fprintf(f, "%d\n", sizeof(long long));
4566   exit(0);
4567 }
4568 EOF
4569 if { (eval echo configure:4570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4570 then
4571   ac_cv_sizeof_long_long=`cat conftestval`
4572 else
4573   conftest_rc="$?"
4574   echo "configure: failed program was:" >&5
4575   cat conftest.$ac_ext >&5
4576   rm -fr conftest*
4577   ac_cv_sizeof_long_long=0
4578 fi
4579 rm -fr conftest*
4580 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4581 { test "$extra_verbose" = "yes" && cat << EOF
4582     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4583 EOF
4584 cat >> confdefs.h <<EOF
4585 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4586 EOF
4587 }
4588
4589
4590 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4591 echo "configure:4592: checking size of void *" >&5
4592
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 #include <stdio.h>
4597 main()
4598 {
4599   FILE *f=fopen("conftestval", "w");
4600   if (!f) exit(1);
4601   fprintf(f, "%d\n", sizeof(void *));
4602   exit(0);
4603 }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4606 then
4607   ac_cv_sizeof_void_p=`cat conftestval`
4608 else
4609   conftest_rc="$?"
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -fr conftest*
4613   ac_cv_sizeof_void_p=0
4614 fi
4615 rm -fr conftest*
4616 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4617 { test "$extra_verbose" = "yes" && cat << EOF
4618     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4619 EOF
4620 cat >> confdefs.h <<EOF
4621 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4622 EOF
4623 }
4624
4625
4626
4627 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4628 echo "configure:4629: checking for long file names" >&5
4629
4630 ac_cv_sys_long_file_names=yes
4631 # Test for long file names in all the places we know might matter:
4632 #      .                the current directory, where building will happen
4633 #      $prefix/lib      where we will be installing things
4634 #      $exec_prefix/lib likewise
4635 # eval it to expand exec_prefix.
4636 #      $TMPDIR          if set, where it might want to write temporary files
4637 # if $TMPDIR is not set:
4638 #      /tmp             where it might want to write temporary files
4639 #      /var/tmp         likewise
4640 #      /usr/tmp         likewise
4641 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4642   ac_tmpdirs="$TMPDIR"
4643 else
4644   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4645 fi
4646 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4647   test -d $ac_dir || continue
4648   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4649   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4650   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4651   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4652   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4653     ac_cv_sys_long_file_names=no
4654     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4655     break
4656   fi
4657   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4658 done
4659
4660 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4661 if test $ac_cv_sys_long_file_names = yes; then
4662   { test "$extra_verbose" = "yes" && cat << \EOF
4663     Defining HAVE_LONG_FILE_NAMES
4664 EOF
4665 cat >> confdefs.h <<\EOF
4666 #define HAVE_LONG_FILE_NAMES 1
4667 EOF
4668 }
4669
4670 fi
4671
4672
4673 echo $ac_n "checking for sin""... $ac_c" 1>&6
4674 echo "configure:4675: checking for sin" >&5
4675
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* System header to define __stub macros and hopefully few prototypes,
4680     which can conflict with char sin(); below.  */
4681 #include <assert.h>
4682 /* Override any gcc2 internal prototype to avoid an error.  */
4683 /* We use char because int might match the return type of a gcc2
4684     builtin and then its argument prototype would still apply.  */
4685 char sin();
4686
4687 int main() {
4688
4689 /* The GNU C library defines this for functions which it implements
4690     to always fail with ENOSYS.  Some functions are actually named
4691     something starting with __ and the normal name is an alias.  */
4692 #if defined (__stub_sin) || defined (__stub___sin)
4693 choke me
4694 #else
4695 sin();
4696 #endif
4697
4698 ; return 0; }
4699 EOF
4700 if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701   rm -rf conftest*
4702   eval "ac_cv_func_sin=yes"
4703 else
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   eval "ac_cv_func_sin=no"
4708 fi
4709 rm -f conftest*
4710
4711 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4712   echo "$ac_t""yes" 1>&6
4713   :
4714 else
4715   echo "$ac_t""no" 1>&6
4716
4717 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4718 echo "configure:4719: checking for sin in -lm" >&5
4719 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4720
4721 xe_check_libs=" -lm "
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 /* Override any gcc2 internal prototype to avoid an error.  */
4726 /* We use char because int might match the return type of a gcc2
4727     builtin and then its argument prototype would still apply.  */
4728 char sin();
4729
4730 int main() {
4731 sin()
4732 ; return 0; }
4733 EOF
4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4735   rm -rf conftest*
4736   eval "ac_cv_lib_$ac_lib_var=yes"
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740   rm -rf conftest*
4741   eval "ac_cv_lib_$ac_lib_var=no"
4742 fi
4743 rm -f conftest*
4744 xe_check_libs=""
4745
4746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4747   echo "$ac_t""yes" 1>&6
4748     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4749     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4750   { test "$extra_verbose" = "yes" && cat << EOF
4751     Defining $ac_tr_lib
4752 EOF
4753 cat >> confdefs.h <<EOF
4754 #define $ac_tr_lib 1
4755 EOF
4756 }
4757
4758   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4759
4760 else
4761   echo "$ac_t""no" 1>&6
4762 fi
4763
4764
4765 fi
4766
4767
4768 { test "$extra_verbose" = "yes" && cat << \EOF
4769     Defining LISP_FLOAT_TYPE
4770 EOF
4771 cat >> confdefs.h <<\EOF
4772 #define LISP_FLOAT_TYPE 1
4773 EOF
4774 }
4775
4776
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 #include <math.h>
4781 int main() {
4782 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   { test "$extra_verbose" = "yes" && cat << \EOF
4788     Defining HAVE_INVERSE_HYPERBOLIC
4789 EOF
4790 cat >> confdefs.h <<\EOF
4791 #define HAVE_INVERSE_HYPERBOLIC 1
4792 EOF
4793 }
4794
4795 else
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798 fi
4799 rm -f conftest*
4800
4801 echo "checking type of mail spool file locking" 1>&6
4802 echo "configure:4803: checking type of mail spool file locking" >&5
4803 for ac_func in lockf flock
4804 do
4805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4806 echo "configure:4807: checking for $ac_func" >&5
4807
4808 cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811 /* System header to define __stub macros and hopefully few prototypes,
4812     which can conflict with char $ac_func(); below.  */
4813 #include <assert.h>
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char $ac_func();
4818
4819 int main() {
4820
4821 /* The GNU C library defines this for functions which it implements
4822     to always fail with ENOSYS.  Some functions are actually named
4823     something starting with __ and the normal name is an alias.  */
4824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4825 choke me
4826 #else
4827 $ac_func();
4828 #endif
4829
4830 ; return 0; }
4831 EOF
4832 if { (eval echo configure:4833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4833   rm -rf conftest*
4834   eval "ac_cv_func_$ac_func=yes"
4835 else
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   eval "ac_cv_func_$ac_func=no"
4840 fi
4841 rm -f conftest*
4842
4843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4846   { test "$extra_verbose" = "yes" && cat << EOF
4847     Defining $ac_tr_func
4848 EOF
4849 cat >> confdefs.h <<EOF
4850 #define $ac_tr_func 1
4851 EOF
4852 }
4853  
4854 else
4855   echo "$ac_t""no" 1>&6
4856 fi
4857 done
4858
4859 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4860 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4861 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4862 if   test -z "$mail_locking"; then
4863   case "$opsys" in cygwin* | mingw*)
4864     mail_locking=pop ;;
4865   esac
4866 fi
4867
4868 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4869     Defining MAIL_LOCK_LOCKF
4870 EOF
4871 cat >> confdefs.h <<\EOF
4872 #define MAIL_LOCK_LOCKF 1
4873 EOF
4874 }
4875
4876 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4877     Defining MAIL_LOCK_FLOCK
4878 EOF
4879 cat >> confdefs.h <<\EOF
4880 #define MAIL_LOCK_FLOCK 1
4881 EOF
4882 }
4883
4884 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4885     Defining MAIL_LOCK_LOCKING
4886 EOF
4887 cat >> confdefs.h <<\EOF
4888 #define MAIL_LOCK_LOCKING 1
4889 EOF
4890 }
4891
4892 elif test "$mail_locking" = "pop"; then
4893   with_pop=yes
4894   mail_locking=
4895 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4896     Defining MAIL_LOCK_DOT
4897 EOF
4898 cat >> confdefs.h <<\EOF
4899 #define MAIL_LOCK_DOT 1
4900 EOF
4901 }
4902
4903 fi
4904 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4905   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4906 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4907   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4908 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4909   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4910
4911 case "$opsys" in decosf*)
4912   
4913 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4914 echo "configure:4915: checking for cma_open in -lpthreads" >&5
4915 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4916
4917 xe_check_libs=" -lpthreads "
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921 /* Override any gcc2 internal prototype to avoid an error.  */
4922 /* We use char because int might match the return type of a gcc2
4923     builtin and then its argument prototype would still apply.  */
4924 char cma_open();
4925
4926 int main() {
4927 cma_open()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 xe_check_libs=""
4941
4942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4943   echo "$ac_t""yes" 1>&6
4944     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4946   { test "$extra_verbose" = "yes" && cat << EOF
4947     Defining $ac_tr_lib
4948 EOF
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_lib 1
4951 EOF
4952 }
4953
4954   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4955
4956 else
4957   echo "$ac_t""no" 1>&6
4958 fi
4959
4960
4961   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4962     c_switch_site="$c_switch_site -threads" ;;
4963 esac
4964
4965 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4966 echo "configure:4967: checking whether the -xildoff compiler flag is required" >&5
4967 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4968   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4969     then echo "$ac_t""no" 1>&6;
4970     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
4971   fi
4972   else echo "$ac_t""no" 1>&6
4973 fi
4974
4975 if test "$opsys" = "sol2"; then
4976   if test "$os_release" -ge 56; then
4977     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4978 echo "configure:4979: checking for \"-z ignore\" linker flag" >&5
4979     case "`ld -h 2>&1`" in
4980       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4981         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4982       *) echo "$ac_t""no" 1>&6 ;;
4983     esac
4984   fi
4985 fi
4986
4987
4988 echo "checking "for specified window system"" 1>&6
4989 echo "configure:4990: checking "for specified window system"" >&5
4990
4991
4992 GNOME_CONFIG=no
4993 GTK_CONFIG=no
4994
4995 if test "$with_gnome" != "no"; then
4996    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
4997 echo "configure:4998: checking for GNOME configuration script" >&5
4998    for possible in gnome-config
4999    do
5000       possible_version=`${possible} --version 2> /dev/null`
5001       if test "x${possible_version}" != "x"; then
5002               GNOME_CONFIG="${possible}"
5003               with_gnome=yes
5004               with_gtk=yes
5005               break
5006       fi
5007    done
5008    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5009 fi
5010
5011 if test "${GNOME_CONFIG}" != "no"; then
5012       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5013       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5014       { test "$extra_verbose" = "yes" && cat << \EOF
5015     Defining HAVE_GNOME
5016 EOF
5017 cat >> confdefs.h <<\EOF
5018 #define HAVE_GNOME 1
5019 EOF
5020 }
5021
5022       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5023       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5024 fi
5025
5026 if test "$with_gtk" != "no";then
5027    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5028 echo "configure:5029: checking for GTK configuration script" >&5
5029    for possible in gtk12-config gtk14-config gtk-config
5030    do
5031       possible_version=`${possible} --version 2> /dev/null`
5032       if test "x${possible_version}" != "x"; then
5033               GTK_CONFIG="${possible}"
5034       fi
5035       case "${possible_version}" in
5036         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5037         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5038         1.2.*)
5039                 with_gtk=yes
5040                 break
5041                 ;;
5042         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5043       esac
5044    done
5045    echo "$ac_t""${GTK_CONFIG}" 1>&6
5046 fi
5047
5048 if test "${GTK_CONFIG}" != "no"; then
5049       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5050 echo "configure:5051: checking gtk version" >&5
5051       GTK_VERSION=`${GTK_CONFIG} --version`
5052       echo "$ac_t""${GTK_VERSION}" 1>&6
5053
5054       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5055 echo "configure:5056: checking gtk libs" >&5
5056       GTK_LIBS=`${GTK_CONFIG} --libs`
5057       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5058       echo "$ac_t""${GTK_LIBS}" 1>&6
5059
5060       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5061 echo "configure:5062: checking gtk cflags" >&5
5062       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5063       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5064       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5065
5066       
5067 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5068 echo "configure:5069: checking for main in -lgdk_imlib" >&5
5069 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5070
5071 xe_check_libs=" -lgdk_imlib "
5072 cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075
5076 int main() {
5077 main()
5078 ; return 0; }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5081   rm -rf conftest*
5082   eval "ac_cv_lib_$ac_lib_var=yes"
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086   rm -rf conftest*
5087   eval "ac_cv_lib_$ac_lib_var=no"
5088 fi
5089 rm -f conftest*
5090 xe_check_libs=""
5091
5092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5093   echo "$ac_t""yes" 1>&6
5094   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5095 else
5096   echo "$ac_t""no" 1>&6
5097 fi
5098
5099
5100       
5101 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5102 echo "configure:5103: checking for Imlib_init in -lImlib" >&5
5103 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5104
5105 xe_check_libs=" -lImlib "
5106 cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109 /* Override any gcc2 internal prototype to avoid an error.  */
5110 /* We use char because int might match the return type of a gcc2
5111     builtin and then its argument prototype would still apply.  */
5112 char Imlib_init();
5113
5114 int main() {
5115 Imlib_init()
5116 ; return 0; }
5117 EOF
5118 if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5119   rm -rf conftest*
5120   eval "ac_cv_lib_$ac_lib_var=yes"
5121 else
5122   echo "configure: failed program was:" >&5
5123   cat conftest.$ac_ext >&5
5124   rm -rf conftest*
5125   eval "ac_cv_lib_$ac_lib_var=no"
5126 fi
5127 rm -f conftest*
5128 xe_check_libs=""
5129
5130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5131   echo "$ac_t""yes" 1>&6
5132   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5133 else
5134   echo "$ac_t""no" 1>&6
5135 fi
5136
5137
5138       for ac_func in gdk_imlib_init
5139 do
5140 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5141 echo "configure:5142: checking for $ac_func" >&5
5142
5143 cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146 /* System header to define __stub macros and hopefully few prototypes,
5147     which can conflict with char $ac_func(); below.  */
5148 #include <assert.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 $ac_func();
5153
5154 int main() {
5155
5156 /* The GNU C library defines this for functions which it implements
5157     to always fail with ENOSYS.  Some functions are actually named
5158     something starting with __ and the normal name is an alias.  */
5159 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5160 choke me
5161 #else
5162 $ac_func();
5163 #endif
5164
5165 ; return 0; }
5166 EOF
5167 if { (eval echo configure:5168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5168   rm -rf conftest*
5169   eval "ac_cv_func_$ac_func=yes"
5170 else
5171   echo "configure: failed program was:" >&5
5172   cat conftest.$ac_ext >&5
5173   rm -rf conftest*
5174   eval "ac_cv_func_$ac_func=no"
5175 fi
5176 rm -f conftest*
5177
5178 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5179   echo "$ac_t""yes" 1>&6
5180     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5181   { test "$extra_verbose" = "yes" && cat << EOF
5182     Defining $ac_tr_func
5183 EOF
5184 cat >> confdefs.h <<EOF
5185 #define $ac_tr_func 1
5186 EOF
5187 }
5188  
5189 else
5190   echo "$ac_t""no" 1>&6
5191 fi
5192 done
5193
5194
5195       { test "$extra_verbose" = "yes" && cat << \EOF
5196     Defining HAVE_XPM
5197 EOF
5198 cat >> confdefs.h <<\EOF
5199 #define HAVE_XPM 1
5200 EOF
5201 }
5202
5203       { test "$extra_verbose" = "yes" && cat << \EOF
5204     Defining HAVE_GTK
5205 EOF
5206 cat >> confdefs.h <<\EOF
5207 #define HAVE_GTK 1
5208 EOF
5209 }
5210
5211       
5212
5213       window_system=gtk
5214       with_gtk=yes
5215       with_x11=no
5216
5217       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5218       test "${with_toolbars}" != no && with_toolbars=gtk
5219       test "${with_menubars}" != "no" && with_menubars=gtk
5220       test "${with_dialogs}" != "no" && with_dialogs=gtk
5221       test "${with_widgets}" != "no" && with_widgets=gtk
5222
5223       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5224    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5225  fi
5226       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5227    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5228  fi
5229       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5230    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5231  fi
5232       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5233    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5234  fi
5235
5236             OLD_CFLAGS="${CFLAGS}"
5237       OLD_LDFLAGS="${LDFLAGS}"
5238       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5239       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5240       for ac_hdr in glade/glade.h glade.h
5241 do
5242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5244 echo "configure:5245: checking for $ac_hdr" >&5
5245
5246 cat > conftest.$ac_ext <<EOF
5247 #line 5248 "configure"
5248 #include "confdefs.h"
5249 #include <$ac_hdr>
5250 EOF
5251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5252 { (eval echo configure:5253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5254 if test -z "$ac_err"; then
5255   rm -rf conftest*
5256   eval "ac_cv_header_$ac_safe=yes"
5257 else
5258   echo "$ac_err" >&5
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261   rm -rf conftest*
5262   eval "ac_cv_header_$ac_safe=no"
5263 fi
5264 rm -f conftest*
5265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5266   echo "$ac_t""yes" 1>&6
5267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5268   { test "$extra_verbose" = "yes" && cat << EOF
5269     Defining $ac_tr_hdr
5270 EOF
5271 cat >> confdefs.h <<EOF
5272 #define $ac_tr_hdr 1
5273 EOF
5274 }
5275  
5276 else
5277   echo "$ac_t""no" 1>&6
5278 fi
5279 done
5280
5281       
5282 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5283 echo "configure:5284: checking for main in -lxml" >&5
5284 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5285
5286 xe_check_libs=" -lxml "
5287 cat > conftest.$ac_ext <<EOF
5288 #line 5289 "configure"
5289 #include "confdefs.h"
5290
5291 int main() {
5292 main()
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296   rm -rf conftest*
5297   eval "ac_cv_lib_$ac_lib_var=yes"
5298 else
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   eval "ac_cv_lib_$ac_lib_var=no"
5303 fi
5304 rm -f conftest*
5305 xe_check_libs=""
5306
5307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5308   echo "$ac_t""yes" 1>&6
5309   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5310 else
5311   echo "$ac_t""no" 1>&6
5312 fi
5313
5314
5315       
5316 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5317 echo "configure:5318: checking for main in -lglade" >&5
5318 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5319
5320 xe_check_libs=" -lglade "
5321 cat > conftest.$ac_ext <<EOF
5322 #line 5323 "configure"
5323 #include "confdefs.h"
5324
5325 int main() {
5326 main()
5327 ; return 0; }
5328 EOF
5329 if { (eval echo configure:5330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5330   rm -rf conftest*
5331   eval "ac_cv_lib_$ac_lib_var=yes"
5332 else
5333   echo "configure: failed program was:" >&5
5334   cat conftest.$ac_ext >&5
5335   rm -rf conftest*
5336   eval "ac_cv_lib_$ac_lib_var=no"
5337 fi
5338 rm -f conftest*
5339 xe_check_libs=""
5340
5341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5342   echo "$ac_t""yes" 1>&6
5343   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5344 else
5345   echo "$ac_t""no" 1>&6
5346 fi
5347
5348
5349       
5350 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5351 echo "configure:5352: checking for main in -lglade-gnome" >&5
5352 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5353
5354 xe_check_libs=" -lglade-gnome "
5355 cat > conftest.$ac_ext <<EOF
5356 #line 5357 "configure"
5357 #include "confdefs.h"
5358
5359 int main() {
5360 main()
5361 ; return 0; }
5362 EOF
5363 if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5364   rm -rf conftest*
5365   eval "ac_cv_lib_$ac_lib_var=yes"
5366 else
5367   echo "configure: failed program was:" >&5
5368   cat conftest.$ac_ext >&5
5369   rm -rf conftest*
5370   eval "ac_cv_lib_$ac_lib_var=no"
5371 fi
5372 rm -f conftest*
5373 xe_check_libs=""
5374
5375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5376   echo "$ac_t""yes" 1>&6
5377   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5378 else
5379   echo "$ac_t""no" 1>&6
5380 fi
5381
5382
5383       cat > conftest.$ac_ext <<EOF
5384 #line 5385 "configure"
5385 #include "confdefs.h"
5386 #include <glade/glade-xml.h>
5387 EOF
5388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5389   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5390   rm -rf conftest*
5391   echo "$ac_t""yes" 1>&6
5392                        { test "$extra_verbose" = "yes" && cat << \EOF
5393     Defining LIBGLADE_XML_TXTDOMAIN = 1
5394 EOF
5395 cat >> confdefs.h <<\EOF
5396 #define LIBGLADE_XML_TXTDOMAIN 1
5397 EOF
5398 }
5399
5400 else
5401   rm -rf conftest*
5402   echo "$ac_t""no" 1>&6
5403 fi
5404 rm -f conftest*
5405
5406       CFLAGS="${OLD_CFLAGS}"
5407       LDFLAGS="${OLD_LDFLAGS}"
5408 fi
5409
5410
5411 if test "$with_x11" != "no"; then
5412     test "$x_includes $x_libraries" != "NONE NONE" && \
5413    window_system=x11 with_x11=yes
5414
5415         
5416       if test "$x_includes $x_libraries" = "NONE NONE" \
5417     -a -n "$OPENWINHOME" \
5418     -a "$OPENWINHOME" != "/usr/openwin" \
5419     -a -d "$OPENWINHOME"; then
5420       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5421       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5422       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5423   fi
5424
5425   if test "$x_includes" = "NONE"; then
5426                     for dir in "/usr/X11" "/usr/X11R6"; do
5427       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5428     done
5429   fi
5430
5431   if test "$x_libraries" = "NONE"; then
5432     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5433       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5434     done
5435   fi
5436
5437   # If we find X, set shell vars x_includes and x_libraries to the
5438 # paths, otherwise set no_x=yes.
5439 # Uses ac_ vars as temps to allow command line to override cache and checks.
5440 # --without-x overrides everything else, but does not touch the cache.
5441 echo $ac_n "checking for X""... $ac_c" 1>&6
5442 echo "configure:5443: checking for X" >&5
5443
5444 # Check whether --with-x or --without-x was given.
5445 if test "${with_x+set}" = set; then
5446   withval="$with_x"
5447   :
5448 fi
5449
5450 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5451 if test "x$with_x" = xno; then
5452   # The user explicitly disabled X.
5453   have_x=disabled
5454 else
5455   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5456     # Both variables are already set.
5457     have_x=yes
5458   else
5459
5460 # One or both of the vars are not set, and there is no cached value.
5461 ac_x_includes=NO ac_x_libraries=NO
5462 rm -fr conftestdir
5463 if mkdir conftestdir; then
5464   cd conftestdir
5465   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5466   cat > Imakefile <<'EOF'
5467 acfindx:
5468         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5469 EOF
5470   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5471     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5472     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5473     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5474     for ac_extension in a so sl; do
5475       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5476         test -f $ac_im_libdir/libX11.$ac_extension; then
5477         ac_im_usrlibdir=$ac_im_libdir; break
5478       fi
5479     done
5480     # Screen out bogus values from the imake configuration.  They are
5481     # bogus both because they are the default anyway, and because
5482     # using them would break gcc on systems where it needs fixed includes.
5483     case "$ac_im_incroot" in
5484         /usr/include) ;;
5485         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5486     esac
5487     case "$ac_im_usrlibdir" in
5488         /usr/lib | /lib) ;;
5489         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5490     esac
5491   fi
5492   cd ..
5493   rm -fr conftestdir
5494 fi
5495
5496 if test "$ac_x_includes" = NO; then
5497   # Guess where to find include files, by looking for this one X11 .h file.
5498   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5499
5500   # First, try using that file with no special directory specified.
5501 cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504 #include <$x_direct_test_include>
5505 EOF
5506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5507 { (eval echo configure:5508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5509 if test -z "$ac_err"; then
5510   rm -rf conftest*
5511   # We can compile using X headers with no special include directory.
5512 ac_x_includes=
5513 else
5514   echo "$ac_err" >&5
5515   echo "configure: failed program was:" >&5
5516   cat conftest.$ac_ext >&5
5517   rm -rf conftest*
5518   # Look for the header file in a standard set of common directories.
5519 # Check X11 before X11Rn because it is often a symlink to the current release.
5520   for ac_dir in               \
5521     /usr/X11/include          \
5522     /usr/X11R6/include        \
5523     /usr/X11R5/include        \
5524     /usr/X11R4/include        \
5525                               \
5526     /usr/include/X11          \
5527     /usr/include/X11R6        \
5528     /usr/include/X11R5        \
5529     /usr/include/X11R4        \
5530                               \
5531     /usr/local/X11/include    \
5532     /usr/local/X11R6/include  \
5533     /usr/local/X11R5/include  \
5534     /usr/local/X11R4/include  \
5535                               \
5536     /usr/local/include/X11    \
5537     /usr/local/include/X11R6  \
5538     /usr/local/include/X11R5  \
5539     /usr/local/include/X11R4  \
5540                               \
5541     /usr/X386/include         \
5542     /usr/x386/include         \
5543     /usr/XFree86/include/X11  \
5544                               \
5545     /usr/include              \
5546     /usr/local/include        \
5547     /usr/unsupported/include  \
5548     /usr/athena/include       \
5549     /usr/local/x11r5/include  \
5550     /usr/lpp/Xamples/include  \
5551                               \
5552     /usr/openwin/include      \
5553     /usr/openwin/share/include \
5554     ; \
5555   do
5556     if test -r "$ac_dir/$x_direct_test_include"; then
5557       ac_x_includes=$ac_dir
5558       break
5559     fi
5560   done
5561 fi
5562 rm -f conftest*
5563 fi # $ac_x_includes = NO
5564
5565 if test "$ac_x_libraries" = NO; then
5566   # Check for the libraries.
5567
5568   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5569   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5570
5571   # See if we find them without any special options.
5572   # Don't add to $LIBS permanently.
5573   ac_save_LIBS="$LIBS"
5574   LIBS="-l$x_direct_test_library $LIBS"
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578
5579 int main() {
5580 ${x_direct_test_function}()
5581 ; return 0; }
5582 EOF
5583 if { (eval echo configure:5584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5584   rm -rf conftest*
5585   LIBS="$ac_save_LIBS"
5586 # We can link X programs with no special library path.
5587 ac_x_libraries=
5588 else
5589   echo "configure: failed program was:" >&5
5590   cat conftest.$ac_ext >&5
5591   rm -rf conftest*
5592   LIBS="$ac_save_LIBS"
5593 # First see if replacing the include by lib works.
5594 # Check X11 before X11Rn because it is often a symlink to the current release.
5595 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5596     /usr/X11/lib          \
5597     /usr/X11R6/lib        \
5598     /usr/X11R5/lib        \
5599     /usr/X11R4/lib        \
5600                           \
5601     /usr/lib/X11          \
5602     /usr/lib/X11R6        \
5603     /usr/lib/X11R5        \
5604     /usr/lib/X11R4        \
5605                           \
5606     /usr/local/X11/lib    \
5607     /usr/local/X11R6/lib  \
5608     /usr/local/X11R5/lib  \
5609     /usr/local/X11R4/lib  \
5610                           \
5611     /usr/local/lib/X11    \
5612     /usr/local/lib/X11R6  \
5613     /usr/local/lib/X11R5  \
5614     /usr/local/lib/X11R4  \
5615                           \
5616     /usr/X386/lib         \
5617     /usr/x386/lib         \
5618     /usr/XFree86/lib/X11  \
5619                           \
5620     /usr/lib              \
5621     /usr/local/lib        \
5622     /usr/unsupported/lib  \
5623     /usr/athena/lib       \
5624     /usr/local/x11r5/lib  \
5625     /usr/lpp/Xamples/lib  \
5626     /lib/usr/lib/X11      \
5627                           \
5628     /usr/openwin/lib      \
5629     /usr/openwin/share/lib \
5630     ; \
5631 do
5632   for ac_extension in a so sl; do
5633     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5634       ac_x_libraries=$ac_dir
5635       break 2
5636     fi
5637   done
5638 done
5639 fi
5640 rm -f conftest*
5641 fi # $ac_x_libraries = NO
5642
5643 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5644   # Didn't find X anywhere.  Cache the known absence of X.
5645   ac_cv_have_x="have_x=no"
5646 else
5647   # Record where we found X for the cache.
5648   ac_cv_have_x="have_x=yes \
5649                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5650 fi
5651   fi
5652   eval "$ac_cv_have_x"
5653 fi # $with_x != no
5654
5655 if test "$have_x" != yes; then
5656   echo "$ac_t""$have_x" 1>&6
5657   no_x=yes
5658 else
5659   # If each of the values was on the command line, it overrides each guess.
5660   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5661   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5662   # Update the cache value to reflect the command line values.
5663   ac_cv_have_x="have_x=yes \
5664                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5665   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5666 fi
5667
5668 if test "$no_x" = yes; then
5669   # Not all programs may use this symbol, but it does not hurt to define it.
5670   { test "$extra_verbose" = "yes" && cat << \EOF
5671     Defining X_DISPLAY_MISSING
5672 EOF
5673 cat >> confdefs.h <<\EOF
5674 #define X_DISPLAY_MISSING 1
5675 EOF
5676 }
5677
5678   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5679 else
5680   if test -n "$x_includes"; then
5681     X_CFLAGS="$X_CFLAGS -I$x_includes"
5682   fi
5683
5684   # It would also be nice to do this for all -L options, not just this one.
5685   if test -n "$x_libraries"; then
5686     X_LIBS="$X_LIBS -L$x_libraries"
5687     # For Solaris; some versions of Sun CC require a space after -R and
5688     # others require no space.  Words are not sufficient . . . .
5689     case "`(uname -sr) 2>/dev/null`" in
5690     "SunOS 5"*)
5691       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5692 echo "configure:5693: checking whether -R must be followed by a space" >&5
5693       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5694       cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697
5698 int main() {
5699
5700 ; return 0; }
5701 EOF
5702 if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703   rm -rf conftest*
5704   ac_R_nospace=yes
5705 else
5706   echo "configure: failed program was:" >&5
5707   cat conftest.$ac_ext >&5
5708   rm -rf conftest*
5709   ac_R_nospace=no
5710 fi
5711 rm -f conftest*
5712       if test $ac_R_nospace = yes; then
5713         echo "$ac_t""no" 1>&6
5714         X_LIBS="$X_LIBS -R$x_libraries"
5715       else
5716         LIBS="$ac_xsave_LIBS -R $x_libraries"
5717         cat > conftest.$ac_ext <<EOF
5718 #line 5719 "configure"
5719 #include "confdefs.h"
5720
5721 int main() {
5722
5723 ; return 0; }
5724 EOF
5725 if { (eval echo configure:5726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5726   rm -rf conftest*
5727   ac_R_space=yes
5728 else
5729   echo "configure: failed program was:" >&5
5730   cat conftest.$ac_ext >&5
5731   rm -rf conftest*
5732   ac_R_space=no
5733 fi
5734 rm -f conftest*
5735         if test $ac_R_space = yes; then
5736           echo "$ac_t""yes" 1>&6
5737           X_LIBS="$X_LIBS -R $x_libraries"
5738         else
5739           echo "$ac_t""neither works" 1>&6
5740         fi
5741       fi
5742       LIBS="$ac_xsave_LIBS"
5743     esac
5744   fi
5745
5746   # Check for system-dependent libraries X programs must link with.
5747   # Do this before checking for the system-independent R6 libraries
5748   # (-lICE), since we may need -lsocket or whatever for X linking.
5749
5750   if test "$ISC" = yes; then
5751     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5752   else
5753     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5754     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5755     # the Alpha needs dnet_stub (dnet does not exist).
5756     if test "$with_dnet" = "no" ; then
5757 ac_cv_lib_dnet_dnet_ntoa=no
5758 else
5759
5760 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5761 echo "configure:5762: checking for dnet_ntoa in -ldnet" >&5
5762 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5763
5764 xe_check_libs=" -ldnet "
5765 cat > conftest.$ac_ext <<EOF
5766 #line 5767 "configure"
5767 #include "confdefs.h"
5768 /* Override any gcc2 internal prototype to avoid an error.  */
5769 /* We use char because int might match the return type of a gcc2
5770     builtin and then its argument prototype would still apply.  */
5771 char dnet_ntoa();
5772
5773 int main() {
5774 dnet_ntoa()
5775 ; return 0; }
5776 EOF
5777 if { (eval echo configure:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5778   rm -rf conftest*
5779   eval "ac_cv_lib_$ac_lib_var=yes"
5780 else
5781   echo "configure: failed program was:" >&5
5782   cat conftest.$ac_ext >&5
5783   rm -rf conftest*
5784   eval "ac_cv_lib_$ac_lib_var=no"
5785 fi
5786 rm -f conftest*
5787 xe_check_libs=""
5788
5789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5790   echo "$ac_t""yes" 1>&6
5791   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5792 else
5793   echo "$ac_t""no" 1>&6
5794 fi
5795
5796 fi
5797
5798     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5799       
5800 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5801 echo "configure:5802: checking for dnet_ntoa in -ldnet_stub" >&5
5802 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5803
5804 xe_check_libs=" -ldnet_stub "
5805 cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808 /* Override any gcc2 internal prototype to avoid an error.  */
5809 /* We use char because int might match the return type of a gcc2
5810     builtin and then its argument prototype would still apply.  */
5811 char dnet_ntoa();
5812
5813 int main() {
5814 dnet_ntoa()
5815 ; return 0; }
5816 EOF
5817 if { (eval echo configure:5818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5818   rm -rf conftest*
5819   eval "ac_cv_lib_$ac_lib_var=yes"
5820 else
5821   echo "configure: failed program was:" >&5
5822   cat conftest.$ac_ext >&5
5823   rm -rf conftest*
5824   eval "ac_cv_lib_$ac_lib_var=no"
5825 fi
5826 rm -f conftest*
5827 xe_check_libs=""
5828
5829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5830   echo "$ac_t""yes" 1>&6
5831   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5832 else
5833   echo "$ac_t""no" 1>&6
5834 fi
5835
5836
5837     fi
5838
5839     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5840     # to get the SysV transport functions.
5841     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5842     # needs -lnsl.
5843     # The nsl library prevents programs from opening the X display
5844     # on Irix 5.2, according to dickey@clark.net.
5845     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5846 echo "configure:5847: checking for gethostbyname" >&5
5847
5848 cat > conftest.$ac_ext <<EOF
5849 #line 5850 "configure"
5850 #include "confdefs.h"
5851 /* System header to define __stub macros and hopefully few prototypes,
5852     which can conflict with char gethostbyname(); below.  */
5853 #include <assert.h>
5854 /* Override any gcc2 internal prototype to avoid an error.  */
5855 /* We use char because int might match the return type of a gcc2
5856     builtin and then its argument prototype would still apply.  */
5857 char gethostbyname();
5858
5859 int main() {
5860
5861 /* The GNU C library defines this for functions which it implements
5862     to always fail with ENOSYS.  Some functions are actually named
5863     something starting with __ and the normal name is an alias.  */
5864 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5865 choke me
5866 #else
5867 gethostbyname();
5868 #endif
5869
5870 ; return 0; }
5871 EOF
5872 if { (eval echo configure:5873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5873   rm -rf conftest*
5874   eval "ac_cv_func_gethostbyname=yes"
5875 else
5876   echo "configure: failed program was:" >&5
5877   cat conftest.$ac_ext >&5
5878   rm -rf conftest*
5879   eval "ac_cv_func_gethostbyname=no"
5880 fi
5881 rm -f conftest*
5882
5883 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5884   echo "$ac_t""yes" 1>&6
5885   :
5886 else
5887   echo "$ac_t""no" 1>&6
5888 fi
5889
5890     if test $ac_cv_func_gethostbyname = no; then
5891       
5892 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5893 echo "configure:5894: checking for gethostbyname in -lnsl" >&5
5894 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5895
5896 xe_check_libs=" -lnsl "
5897 cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char gethostbyname();
5904
5905 int main() {
5906 gethostbyname()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 xe_check_libs=""
5920
5921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5922   echo "$ac_t""yes" 1>&6
5923   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5924 else
5925   echo "$ac_t""no" 1>&6
5926 fi
5927
5928
5929     fi
5930
5931     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5932     # socket/setsockopt and other routines are undefined under SCO ODT
5933     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5934     # on later versions), says simon@lia.di.epfl.ch: it contains
5935     # gethostby* variants that don't use the nameserver (or something).
5936     # -lsocket must be given before -lnsl if both are needed.
5937     # We assume that if connect needs -lnsl, so does gethostbyname.
5938     echo $ac_n "checking for connect""... $ac_c" 1>&6
5939 echo "configure:5940: checking for connect" >&5
5940
5941 cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5944 /* System header to define __stub macros and hopefully few prototypes,
5945     which can conflict with char connect(); below.  */
5946 #include <assert.h>
5947 /* Override any gcc2 internal prototype to avoid an error.  */
5948 /* We use char because int might match the return type of a gcc2
5949     builtin and then its argument prototype would still apply.  */
5950 char connect();
5951
5952 int main() {
5953
5954 /* The GNU C library defines this for functions which it implements
5955     to always fail with ENOSYS.  Some functions are actually named
5956     something starting with __ and the normal name is an alias.  */
5957 #if defined (__stub_connect) || defined (__stub___connect)
5958 choke me
5959 #else
5960 connect();
5961 #endif
5962
5963 ; return 0; }
5964 EOF
5965 if { (eval echo configure:5966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5966   rm -rf conftest*
5967   eval "ac_cv_func_connect=yes"
5968 else
5969   echo "configure: failed program was:" >&5
5970   cat conftest.$ac_ext >&5
5971   rm -rf conftest*
5972   eval "ac_cv_func_connect=no"
5973 fi
5974 rm -f conftest*
5975
5976 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5977   echo "$ac_t""yes" 1>&6
5978   :
5979 else
5980   echo "$ac_t""no" 1>&6
5981 fi
5982
5983     if test $ac_cv_func_connect = no; then
5984       
5985 xe_msg_checking="for connect in -lsocket"
5986 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5987 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5988 echo "configure:5989: checking "$xe_msg_checking"" >&5
5989 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5990
5991 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5992 cat > conftest.$ac_ext <<EOF
5993 #line 5994 "configure"
5994 #include "confdefs.h"
5995 /* Override any gcc2 internal prototype to avoid an error.  */
5996 /* We use char because int might match the return type of a gcc2
5997     builtin and then its argument prototype would still apply.  */
5998 char connect();
5999
6000 int main() {
6001 connect()
6002 ; return 0; }
6003 EOF
6004 if { (eval echo configure:6005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6005   rm -rf conftest*
6006   eval "ac_cv_lib_$ac_lib_var=yes"
6007 else
6008   echo "configure: failed program was:" >&5
6009   cat conftest.$ac_ext >&5
6010   rm -rf conftest*
6011   eval "ac_cv_lib_$ac_lib_var=no"
6012 fi
6013 rm -f conftest*
6014 xe_check_libs=""
6015
6016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6017   echo "$ac_t""yes" 1>&6
6018   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6019 else
6020   echo "$ac_t""no" 1>&6
6021 fi
6022
6023
6024     fi
6025
6026     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6027     echo $ac_n "checking for remove""... $ac_c" 1>&6
6028 echo "configure:6029: checking for remove" >&5
6029
6030 cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033 /* System header to define __stub macros and hopefully few prototypes,
6034     which can conflict with char remove(); below.  */
6035 #include <assert.h>
6036 /* Override any gcc2 internal prototype to avoid an error.  */
6037 /* We use char because int might match the return type of a gcc2
6038     builtin and then its argument prototype would still apply.  */
6039 char remove();
6040
6041 int main() {
6042
6043 /* The GNU C library defines this for functions which it implements
6044     to always fail with ENOSYS.  Some functions are actually named
6045     something starting with __ and the normal name is an alias.  */
6046 #if defined (__stub_remove) || defined (__stub___remove)
6047 choke me
6048 #else
6049 remove();
6050 #endif
6051
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6055   rm -rf conftest*
6056   eval "ac_cv_func_remove=yes"
6057 else
6058   echo "configure: failed program was:" >&5
6059   cat conftest.$ac_ext >&5
6060   rm -rf conftest*
6061   eval "ac_cv_func_remove=no"
6062 fi
6063 rm -f conftest*
6064
6065 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6066   echo "$ac_t""yes" 1>&6
6067   :
6068 else
6069   echo "$ac_t""no" 1>&6
6070 fi
6071
6072     if test $ac_cv_func_remove = no; then
6073       
6074 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6075 echo "configure:6076: checking for remove in -lposix" >&5
6076 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6077
6078 xe_check_libs=" -lposix "
6079 cat > conftest.$ac_ext <<EOF
6080 #line 6081 "configure"
6081 #include "confdefs.h"
6082 /* Override any gcc2 internal prototype to avoid an error.  */
6083 /* We use char because int might match the return type of a gcc2
6084     builtin and then its argument prototype would still apply.  */
6085 char remove();
6086
6087 int main() {
6088 remove()
6089 ; return 0; }
6090 EOF
6091 if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6092   rm -rf conftest*
6093   eval "ac_cv_lib_$ac_lib_var=yes"
6094 else
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -rf conftest*
6098   eval "ac_cv_lib_$ac_lib_var=no"
6099 fi
6100 rm -f conftest*
6101 xe_check_libs=""
6102
6103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6104   echo "$ac_t""yes" 1>&6
6105   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6106 else
6107   echo "$ac_t""no" 1>&6
6108 fi
6109
6110
6111     fi
6112
6113     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6114     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6115 echo "configure:6116: checking for shmat" >&5
6116
6117 cat > conftest.$ac_ext <<EOF
6118 #line 6119 "configure"
6119 #include "confdefs.h"
6120 /* System header to define __stub macros and hopefully few prototypes,
6121     which can conflict with char shmat(); below.  */
6122 #include <assert.h>
6123 /* Override any gcc2 internal prototype to avoid an error.  */
6124 /* We use char because int might match the return type of a gcc2
6125     builtin and then its argument prototype would still apply.  */
6126 char shmat();
6127
6128 int main() {
6129
6130 /* The GNU C library defines this for functions which it implements
6131     to always fail with ENOSYS.  Some functions are actually named
6132     something starting with __ and the normal name is an alias.  */
6133 #if defined (__stub_shmat) || defined (__stub___shmat)
6134 choke me
6135 #else
6136 shmat();
6137 #endif
6138
6139 ; return 0; }
6140 EOF
6141 if { (eval echo configure:6142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6142   rm -rf conftest*
6143   eval "ac_cv_func_shmat=yes"
6144 else
6145   echo "configure: failed program was:" >&5
6146   cat conftest.$ac_ext >&5
6147   rm -rf conftest*
6148   eval "ac_cv_func_shmat=no"
6149 fi
6150 rm -f conftest*
6151
6152 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6153   echo "$ac_t""yes" 1>&6
6154   :
6155 else
6156   echo "$ac_t""no" 1>&6
6157 fi
6158
6159     if test $ac_cv_func_shmat = no; then
6160       
6161 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6162 echo "configure:6163: checking for shmat in -lipc" >&5
6163 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6164
6165 xe_check_libs=" -lipc "
6166 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 /* Override any gcc2 internal prototype to avoid an error.  */
6170 /* We use char because int might match the return type of a gcc2
6171     builtin and then its argument prototype would still apply.  */
6172 char shmat();
6173
6174 int main() {
6175 shmat()
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_lib_$ac_lib_var=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=no"
6186 fi
6187 rm -f conftest*
6188 xe_check_libs=""
6189
6190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6191   echo "$ac_t""yes" 1>&6
6192   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6193 else
6194   echo "$ac_t""no" 1>&6
6195 fi
6196
6197
6198     fi
6199   fi
6200
6201   # Check for libraries that X11R6 Xt/Xaw programs need.
6202   ac_save_LDFLAGS="$LDFLAGS"
6203   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6204   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6205   # check for ICE first), but we must link in the order -lSM -lICE or
6206   # we get undefined symbols.  So assume we have SM if we have ICE.
6207   # These have to be linked with before -lX11, unlike the other
6208   # libraries we check for below, so use a different variable.
6209   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6210   
6211 xe_msg_checking="for IceConnectionNumber in -lICE"
6212 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6213 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6214 echo "configure:6215: checking "$xe_msg_checking"" >&5
6215 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6216
6217 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6218 cat > conftest.$ac_ext <<EOF
6219 #line 6220 "configure"
6220 #include "confdefs.h"
6221 /* Override any gcc2 internal prototype to avoid an error.  */
6222 /* We use char because int might match the return type of a gcc2
6223     builtin and then its argument prototype would still apply.  */
6224 char IceConnectionNumber();
6225
6226 int main() {
6227 IceConnectionNumber()
6228 ; return 0; }
6229 EOF
6230 if { (eval echo configure:6231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6231   rm -rf conftest*
6232   eval "ac_cv_lib_$ac_lib_var=yes"
6233 else
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -rf conftest*
6237   eval "ac_cv_lib_$ac_lib_var=no"
6238 fi
6239 rm -f conftest*
6240 xe_check_libs=""
6241
6242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6243   echo "$ac_t""yes" 1>&6
6244   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6245 else
6246   echo "$ac_t""no" 1>&6
6247 fi
6248
6249
6250   LDFLAGS="$ac_save_LDFLAGS"
6251
6252 fi
6253  # Autoconf claims to find X library and include dirs for us.
6254   if test "$no_x" = "yes"
6255   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6256   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6257   fi
6258 fi
6259
6260
6261 if test "$with_x11" = "yes"; then
6262   { test "$extra_verbose" = "yes" && cat << \EOF
6263     Defining HAVE_X_WINDOWS
6264 EOF
6265 cat >> confdefs.h <<\EOF
6266 #define HAVE_X_WINDOWS 1
6267 EOF
6268 }
6269
6270   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6271   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6272
6273       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6274     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6275     if test -d "$lib_dir" -a -d "$inc_dir"; then
6276       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6277         x_libraries="$lib_dir $x_libraries"
6278         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6279       esac
6280       case "$x_includes" in "$inc_dir"* ) ;; *)
6281         x_includes="$inc_dir $x_includes"
6282         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6283       esac
6284       break;       fi
6285   done
6286
6287     for rel in "X11R6" "X11R5" "X11R4"; do
6288     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6289     if test -d "$lib_dir" -a -d "$inc_dir"; then
6290       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6291         x_libraries="$x_libraries $lib_dir"
6292         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6293       esac
6294       case "$x_includes" in "$inc_dir"* ) ;; *)
6295         x_includes="$x_includes $inc_dir"
6296         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6297       esac
6298       break;     fi
6299   done
6300
6301     case "$opsys" in
6302   decosf*) 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 ;;
6303   esac
6304
6305   ld_switch_x_site="$X_LIBS"
6306
6307   
6308 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6309     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6310   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6311   
6312         runpath="" runpath_dirs=""
6313   if test -n "$LD_RUN_PATH"; then
6314     runpath="$LD_RUN_PATH"
6315   elif test "$GCC" = "yes"; then
6316         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6317     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6318     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6319     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6320       case "$arg" in P,* | -L* | -R* )
6321         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6322           {
6323 xe_runpath_dir="$dir"
6324   test "$xe_runpath_dir" != "/lib"     -a \
6325         "$xe_runpath_dir" != "/usr/lib" -a \
6326         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6327   eval "$xe_add_unique_runpath_dir"
6328 }
6329         done ;;
6330       esac
6331     done
6332     ld_switch_run="$ld_switch_run_save"
6333     rm -f conftest*
6334   else
6335         for arg in $ld_switch_site $ld_switch_x_site; do
6336       case "$arg" in -L*) {
6337 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6338   test "$xe_runpath_dir" != "/lib"     -a \
6339         "$xe_runpath_dir" != "/usr/lib" -a \
6340         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6341   eval "$xe_add_unique_runpath_dir"
6342 };; esac
6343     done
6344         if test "$opsys $need_motif" = "sol2 yes"; then
6345       xe_runpath_dir="/opt/SUNWdt/lib";
6346       eval "$xe_add_unique_runpath_dir";
6347     fi
6348   fi 
6349   if test -n "$runpath"; then
6350     ld_switch_run="${dash_r}${runpath}"
6351     
6352 if test "$GCC" = "yes"; then
6353   set x $ld_switch_run; shift; ld_switch_run=""
6354   while test -n "$1"; do
6355     case $1 in
6356       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6357       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6358       -Xlinker* ) ;;
6359       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6360     esac
6361     shift
6362   done
6363 fi
6364     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6365   fi
6366 fi
6367
6368
6369   if test "$extra_verbose" = "yes"; then
6370     echo; echo "X11 compilation variables:"
6371     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6372     echo
6373   fi
6374
6375             bitmapdirs=
6376   if test "$x_includes" != NONE; then
6377     for i in $x_includes; do
6378       if test -d "$i/bitmaps"; then
6379         bitmapdirs="$i/bitmaps:$bitmapdirs"
6380       fi
6381       if test -d "$i/X11/bitmaps"; then
6382         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6383       fi
6384     done
6385     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6386   fi
6387   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6388     Defining BITMAPDIR = "$bitmapdirs"
6389 EOF
6390 cat >> confdefs.h <<EOF
6391 #define BITMAPDIR "$bitmapdirs"
6392 EOF
6393 }
6394
6395
6396     echo "checking for X defines extracted by xmkmf" 1>&6
6397 echo "configure:6398: checking for X defines extracted by xmkmf" >&5
6398   rm -fr conftestdir
6399   if mkdir conftestdir; then
6400     cd conftestdir
6401     cat > Imakefile <<'EOF'
6402 xetest:
6403         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6404 EOF
6405     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6406       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6407       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6408     fi
6409     cd ..
6410     rm -fr conftestdir
6411     for word in $xmkmf_defines; do
6412       case "$word" in -D* )
6413         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6414         case "$word" in
6415           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6416           *     ) val=1 ;;
6417         esac
6418         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6419           if test "$val" = "1"
6420             then { test "$extra_verbose" = "yes" && cat << EOF
6421     Defining $sym
6422 EOF
6423 cat >> confdefs.h <<EOF
6424 #define $sym 1
6425 EOF
6426 }
6427
6428             else { test "$extra_verbose" = "yes" && cat << EOF
6429     Defining $sym = $val
6430 EOF
6431 cat >> confdefs.h <<EOF
6432 #define $sym $val
6433 EOF
6434 }
6435
6436           fi
6437         fi  ;;
6438       esac
6439     done
6440   fi
6441
6442     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6443 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6444 echo "configure:6445: checking for X11/Intrinsic.h" >&5
6445
6446 cat > conftest.$ac_ext <<EOF
6447 #line 6448 "configure"
6448 #include "confdefs.h"
6449 #include <X11/Intrinsic.h>
6450 EOF
6451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6452 { (eval echo configure:6453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6454 if test -z "$ac_err"; then
6455   rm -rf conftest*
6456   eval "ac_cv_header_$ac_safe=yes"
6457 else
6458   echo "$ac_err" >&5
6459   echo "configure: failed program was:" >&5
6460   cat conftest.$ac_ext >&5
6461   rm -rf conftest*
6462   eval "ac_cv_header_$ac_safe=no"
6463 fi
6464 rm -f conftest*
6465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6466   echo "$ac_t""yes" 1>&6
6467   :
6468 else
6469   echo "$ac_t""no" 1>&6
6470 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6471 fi
6472
6473
6474       
6475 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6476 echo "configure:6477: checking for XOpenDisplay in -lX11" >&5
6477 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6478
6479 xe_check_libs=" -lX11 "
6480 cat > conftest.$ac_ext <<EOF
6481 #line 6482 "configure"
6482 #include "confdefs.h"
6483 /* Override any gcc2 internal prototype to avoid an error.  */
6484 /* We use char because int might match the return type of a gcc2
6485     builtin and then its argument prototype would still apply.  */
6486 char XOpenDisplay();
6487
6488 int main() {
6489 XOpenDisplay()
6490 ; return 0; }
6491 EOF
6492 if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6493   rm -rf conftest*
6494   eval "ac_cv_lib_$ac_lib_var=yes"
6495 else
6496   echo "configure: failed program was:" >&5
6497   cat conftest.$ac_ext >&5
6498   rm -rf conftest*
6499   eval "ac_cv_lib_$ac_lib_var=no"
6500 fi
6501 rm -f conftest*
6502 xe_check_libs=""
6503
6504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6505   echo "$ac_t""yes" 1>&6
6506   have_lib_x11=yes
6507 else
6508   echo "$ac_t""no" 1>&6
6509 fi
6510
6511
6512   if test "$have_lib_x11" != "yes"; then
6513     
6514 xe_msg_checking="for XGetFontProperty in -lX11"
6515 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6516 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6517 echo "configure:6518: checking "$xe_msg_checking"" >&5
6518 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6519
6520 xe_check_libs=" -lX11 -b i486-linuxaout"
6521 cat > conftest.$ac_ext <<EOF
6522 #line 6523 "configure"
6523 #include "confdefs.h"
6524 /* Override any gcc2 internal prototype to avoid an error.  */
6525 /* We use char because int might match the return type of a gcc2
6526     builtin and then its argument prototype would still apply.  */
6527 char XGetFontProperty();
6528
6529 int main() {
6530 XGetFontProperty()
6531 ; return 0; }
6532 EOF
6533 if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6534   rm -rf conftest*
6535   eval "ac_cv_lib_$ac_lib_var=yes"
6536 else
6537   echo "configure: failed program was:" >&5
6538   cat conftest.$ac_ext >&5
6539   rm -rf conftest*
6540   eval "ac_cv_lib_$ac_lib_var=no"
6541 fi
6542 rm -f conftest*
6543 xe_check_libs=""
6544
6545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6546   echo "$ac_t""yes" 1>&6
6547   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6548 else
6549   echo "$ac_t""no" 1>&6
6550 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6551 fi
6552
6553
6554   fi
6555   libs_x="-lX11"
6556   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6557
6558     
6559 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6560 echo "configure:6561: checking for XShapeSelectInput in -lXext" >&5
6561 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6562
6563 xe_check_libs=" -lXext "
6564 cat > conftest.$ac_ext <<EOF
6565 #line 6566 "configure"
6566 #include "confdefs.h"
6567 /* Override any gcc2 internal prototype to avoid an error.  */
6568 /* We use char because int might match the return type of a gcc2
6569     builtin and then its argument prototype would still apply.  */
6570 char XShapeSelectInput();
6571
6572 int main() {
6573 XShapeSelectInput()
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   eval "ac_cv_lib_$ac_lib_var=yes"
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_lib_$ac_lib_var=no"
6584 fi
6585 rm -f conftest*
6586 xe_check_libs=""
6587
6588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6589   echo "$ac_t""yes" 1>&6
6590   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6591 else
6592   echo "$ac_t""no" 1>&6
6593 fi
6594
6595
6596
6597     
6598 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6599 echo "configure:6600: checking for XtOpenDisplay in -lXt" >&5
6600 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6601
6602 xe_check_libs=" -lXt "
6603 cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 /* Override any gcc2 internal prototype to avoid an error.  */
6607 /* We use char because int might match the return type of a gcc2
6608     builtin and then its argument prototype would still apply.  */
6609 char XtOpenDisplay();
6610
6611 int main() {
6612 XtOpenDisplay()
6613 ; return 0; }
6614 EOF
6615 if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6616   rm -rf conftest*
6617   eval "ac_cv_lib_$ac_lib_var=yes"
6618 else
6619   echo "configure: failed program was:" >&5
6620   cat conftest.$ac_ext >&5
6621   rm -rf conftest*
6622   eval "ac_cv_lib_$ac_lib_var=no"
6623 fi
6624 rm -f conftest*
6625 xe_check_libs=""
6626
6627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6628   echo "$ac_t""yes" 1>&6
6629   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6630 else
6631   echo "$ac_t""no" 1>&6
6632 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6633 fi
6634
6635
6636
6637   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6638 echo "configure:6639: checking the version of X11 being used" >&5
6639   cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642 #include <X11/Intrinsic.h>
6643     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6644 EOF
6645 if { (eval echo configure:6646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6646 then
6647   ./conftest foobar; x11_release=$?
6648 else
6649   conftest_rc="$?"
6650   echo "configure: failed program was:" >&5
6651   cat conftest.$ac_ext >&5
6652   rm -fr conftest*
6653   x11_release=4
6654 fi
6655 rm -fr conftest*
6656   echo "$ac_t""R${x11_release}" 1>&6
6657   { test "$extra_verbose" = "yes" && cat << EOF
6658     Defining THIS_IS_X11R${x11_release}
6659 EOF
6660 cat >> confdefs.h <<EOF
6661 #define THIS_IS_X11R${x11_release} 1
6662 EOF
6663 }
6664
6665
6666   if test "${x11_release}" = "4"; then
6667     case "$with_widgets" in
6668       "" | "no") with_widgets=no ;;
6669       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6670     esac
6671   fi
6672
6673   for ac_func in XConvertCase
6674 do
6675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6676 echo "configure:6677: checking for $ac_func" >&5
6677
6678 cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 /* System header to define __stub macros and hopefully few prototypes,
6682     which can conflict with char $ac_func(); below.  */
6683 #include <assert.h>
6684 /* Override any gcc2 internal prototype to avoid an error.  */
6685 /* We use char because int might match the return type of a gcc2
6686     builtin and then its argument prototype would still apply.  */
6687 char $ac_func();
6688
6689 int main() {
6690
6691 /* The GNU C library defines this for functions which it implements
6692     to always fail with ENOSYS.  Some functions are actually named
6693     something starting with __ and the normal name is an alias.  */
6694 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6695 choke me
6696 #else
6697 $ac_func();
6698 #endif
6699
6700 ; return 0; }
6701 EOF
6702 if { (eval echo configure:6703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6703   rm -rf conftest*
6704   eval "ac_cv_func_$ac_func=yes"
6705 else
6706   echo "configure: failed program was:" >&5
6707   cat conftest.$ac_ext >&5
6708   rm -rf conftest*
6709   eval "ac_cv_func_$ac_func=no"
6710 fi
6711 rm -f conftest*
6712
6713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6714   echo "$ac_t""yes" 1>&6
6715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6716   { test "$extra_verbose" = "yes" && cat << EOF
6717     Defining $ac_tr_func
6718 EOF
6719 cat >> confdefs.h <<EOF
6720 #define $ac_tr_func 1
6721 EOF
6722 }
6723  
6724 else
6725   echo "$ac_t""no" 1>&6
6726 fi
6727 done
6728
6729
6730   for ac_hdr in X11/Xlocale.h
6731 do
6732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6734 echo "configure:6735: checking for $ac_hdr" >&5
6735
6736 cat > conftest.$ac_ext <<EOF
6737 #line 6738 "configure"
6738 #include "confdefs.h"
6739 #include <$ac_hdr>
6740 EOF
6741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6742 { (eval echo configure:6743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6744 if test -z "$ac_err"; then
6745   rm -rf conftest*
6746   eval "ac_cv_header_$ac_safe=yes"
6747 else
6748   echo "$ac_err" >&5
6749   echo "configure: failed program was:" >&5
6750   cat conftest.$ac_ext >&5
6751   rm -rf conftest*
6752   eval "ac_cv_header_$ac_safe=no"
6753 fi
6754 rm -f conftest*
6755 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6756   echo "$ac_t""yes" 1>&6
6757     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6758   { test "$extra_verbose" = "yes" && cat << EOF
6759     Defining $ac_tr_hdr
6760 EOF
6761 cat >> confdefs.h <<EOF
6762 #define $ac_tr_hdr 1
6763 EOF
6764 }
6765  
6766 else
6767   echo "$ac_t""no" 1>&6
6768 fi
6769 done
6770
6771
6772     for ac_func in XRegisterIMInstantiateCallback
6773 do
6774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6775 echo "configure:6776: checking for $ac_func" >&5
6776
6777 cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 /* System header to define __stub macros and hopefully few prototypes,
6781     which can conflict with char $ac_func(); below.  */
6782 #include <assert.h>
6783 /* Override any gcc2 internal prototype to avoid an error.  */
6784 /* We use char because int might match the return type of a gcc2
6785     builtin and then its argument prototype would still apply.  */
6786 char $ac_func();
6787
6788 int main() {
6789
6790 /* The GNU C library defines this for functions which it implements
6791     to always fail with ENOSYS.  Some functions are actually named
6792     something starting with __ and the normal name is an alias.  */
6793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6794 choke me
6795 #else
6796 $ac_func();
6797 #endif
6798
6799 ; return 0; }
6800 EOF
6801 if { (eval echo configure:6802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6802   rm -rf conftest*
6803   eval "ac_cv_func_$ac_func=yes"
6804 else
6805   echo "configure: failed program was:" >&5
6806   cat conftest.$ac_ext >&5
6807   rm -rf conftest*
6808   eval "ac_cv_func_$ac_func=no"
6809 fi
6810 rm -f conftest*
6811
6812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6815   { test "$extra_verbose" = "yes" && cat << EOF
6816     Defining $ac_tr_func
6817 EOF
6818 cat >> confdefs.h <<EOF
6819 #define $ac_tr_func 1
6820 EOF
6821 }
6822  
6823 else
6824   echo "$ac_t""no" 1>&6
6825 fi
6826 done
6827
6828   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6829 echo "configure:6830: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6830   cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833
6834 #define NeedFunctionPrototypes 1
6835 #include <X11/Xlib.h>
6836 extern Bool XRegisterIMInstantiateCallback(
6837    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6838
6839 int main() {
6840
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6844   rm -rf conftest*
6845   echo "$ac_t""yes" 1>&6
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   echo "$ac_t""no" 1>&6
6851    { test "$extra_verbose" = "yes" && cat << \EOF
6852     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6853 EOF
6854 cat >> confdefs.h <<\EOF
6855 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6856 EOF
6857 }
6858
6859 fi
6860 rm -f conftest*
6861
6862     test -z "$with_xmu" && { 
6863 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6864 echo "configure:6865: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6865 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6866
6867 xe_check_libs=" -lXmu "
6868 cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 /* Override any gcc2 internal prototype to avoid an error.  */
6872 /* We use char because int might match the return type of a gcc2
6873     builtin and then its argument prototype would still apply.  */
6874 char XmuReadBitmapDataFromFile();
6875
6876 int main() {
6877 XmuReadBitmapDataFromFile()
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6881   rm -rf conftest*
6882   eval "ac_cv_lib_$ac_lib_var=yes"
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=no"
6888 fi
6889 rm -f conftest*
6890 xe_check_libs=""
6891
6892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6893   echo "$ac_t""yes" 1>&6
6894   with_xmu=yes
6895 else
6896   echo "$ac_t""no" 1>&6
6897 with_xmu=no
6898 fi
6899
6900  }
6901   if test "$with_xmu" = "no"; then
6902     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6903    echo "    xemacs will be linked with \"xmu.o\""
6904  fi
6905   else
6906     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6907     { test "$extra_verbose" = "yes" && cat << \EOF
6908     Defining HAVE_XMU
6909 EOF
6910 cat >> confdefs.h <<\EOF
6911 #define HAVE_XMU 1
6912 EOF
6913 }
6914
6915   fi
6916
6917       
6918 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6919 echo "configure:6920: checking for main in -lXbsd" >&5
6920 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6921
6922 xe_check_libs=" -lXbsd "
6923 cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926
6927 int main() {
6928 main()
6929 ; return 0; }
6930 EOF
6931 if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932   rm -rf conftest*
6933   eval "ac_cv_lib_$ac_lib_var=yes"
6934 else
6935   echo "configure: failed program was:" >&5
6936   cat conftest.$ac_ext >&5
6937   rm -rf conftest*
6938   eval "ac_cv_lib_$ac_lib_var=no"
6939 fi
6940 rm -f conftest*
6941 xe_check_libs=""
6942
6943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6944   echo "$ac_t""yes" 1>&6
6945   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6946 else
6947   echo "$ac_t""no" 1>&6
6948 fi
6949
6950
6951
6952     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6953         if test "$GCC" = "yes"; then
6954       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6955       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6956     else
6957       case "$CC" in
6958         "xlc" ) CC="xlc_r" ;;
6959         "xlC" ) CC="xlC_r" ;;
6960         "cc"  ) CC="cc_r" ;;
6961       esac
6962     fi
6963   fi
6964
6965 fi 
6966 if test "$with_msw" != "no"; then
6967   echo "checking for MS-Windows" 1>&6
6968 echo "configure:6969: checking for MS-Windows" >&5
6969   
6970 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6971 echo "configure:6972: checking for main in -lgdi32" >&5
6972 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6973
6974 xe_check_libs=" -lgdi32 "
6975 cat > conftest.$ac_ext <<EOF
6976 #line 6977 "configure"
6977 #include "confdefs.h"
6978
6979 int main() {
6980 main()
6981 ; return 0; }
6982 EOF
6983 if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6984   rm -rf conftest*
6985   eval "ac_cv_lib_$ac_lib_var=yes"
6986 else
6987   echo "configure: failed program was:" >&5
6988   cat conftest.$ac_ext >&5
6989   rm -rf conftest*
6990   eval "ac_cv_lib_$ac_lib_var=no"
6991 fi
6992 rm -f conftest*
6993 xe_check_libs=""
6994
6995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6996   echo "$ac_t""yes" 1>&6
6997   with_msw=yes
6998 else
6999   echo "$ac_t""no" 1>&6
7000 fi
7001
7002
7003   if test "$with_msw" = "yes"; then
7004     { test "$extra_verbose" = "yes" && cat << \EOF
7005     Defining HAVE_MS_WINDOWS
7006 EOF
7007 cat >> confdefs.h <<\EOF
7008 #define HAVE_MS_WINDOWS 1
7009 EOF
7010 }
7011
7012
7013         if test "$with_netinstall" = "yes"; then
7014       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7015       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7016       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7017     fi
7018
7019     install_pp="$blddir/lib-src/installexe.sh"
7020     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
7021     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7022     if test "$window_system" != x11; then
7023         window_system=msw
7024         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7025             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7026    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7027  fi
7028         test "$with_menubars"   != "no" && with_menubars=msw \
7029             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7030    echo "    xemacs will be linked with \"menubar-msw.o\""
7031  fi
7032         test "$with_toolbars"   != "no" && with_toolbars=msw \
7033             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7034    echo "    xemacs will be linked with \"toolbar-msw.o\""
7035  fi
7036         test "$with_dialogs"   != "no" && with_dialogs=msw \
7037             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7038    echo "    xemacs will be linked with \"dialog-msw.o\""
7039  fi
7040         test "$with_widgets"   != "no" && with_widgets=msw
7041     else
7042         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7043    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7044  fi
7045         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7046    echo "    xemacs will be linked with \"menubar-msw.o\""
7047  fi
7048         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7049    echo "    xemacs will be linked with \"toolbar-msw.o\""
7050  fi
7051         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"dialog-msw.o\""
7053  fi
7054     fi
7055         cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7058 #include <fcntl.h>
7059     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7060 EOF
7061 if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7062 then
7063   { test "$extra_verbose" = "yes" && cat << \EOF
7064     Defining HAVE_MSG_SELECT
7065 EOF
7066 cat >> confdefs.h <<\EOF
7067 #define HAVE_MSG_SELECT 1
7068 EOF
7069 }
7070
7071 else
7072   conftest_rc="$?"
7073   echo "configure: failed program was:" >&5
7074   cat conftest.$ac_ext >&5
7075 fi
7076 rm -fr conftest*
7077     with_file_coding=yes
7078     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
7079    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\""
7080  fi
7081   fi
7082 fi
7083
7084
7085
7086 test -z "$window_system" && window_system="none"
7087
7088 if test "$window_system" = "none"; then
7089   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7090   do
7091     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7092        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7093     fi
7094     eval "with_${feature}=no"
7095   done
7096 else
7097   test -z "$with_toolbars" && with_toolbars=yes
7098 fi
7099
7100 if test "$with_msw" != "yes"; then
7101   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7102   do
7103     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7104        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7105     fi
7106     eval "with_${feature}=no"
7107   done
7108 else
7109   :
7110 fi
7111
7112 if test "$with_x11" != "yes"; then
7113             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7114   do
7115     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7116        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7117     fi
7118     eval "with_${feature}=no"
7119   done
7120 fi
7121
7122 if test "$with_x11" = "yes"; then
7123   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7124 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7125 echo "configure:7126: checking for X11/extensions/shape.h" >&5
7126
7127 cat > conftest.$ac_ext <<EOF
7128 #line 7129 "configure"
7129 #include "confdefs.h"
7130 #include <X11/extensions/shape.h>
7131 EOF
7132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7133 { (eval echo configure:7134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7135 if test -z "$ac_err"; then
7136   rm -rf conftest*
7137   eval "ac_cv_header_$ac_safe=yes"
7138 else
7139   echo "$ac_err" >&5
7140   echo "configure: failed program was:" >&5
7141   cat conftest.$ac_ext >&5
7142   rm -rf conftest*
7143   eval "ac_cv_header_$ac_safe=no"
7144 fi
7145 rm -f conftest*
7146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7147   echo "$ac_t""yes" 1>&6
7148   
7149    { test "$extra_verbose" = "yes" && cat << \EOF
7150     Defining HAVE_BALLOON_HELP
7151 EOF
7152 cat >> confdefs.h <<\EOF
7153 #define HAVE_BALLOON_HELP 1
7154 EOF
7155 }
7156
7157    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7158    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7159  fi
7160 else
7161   echo "$ac_t""no" 1>&6
7162 fi
7163
7164 fi
7165
7166 bitmapdir=
7167
7168 case "$window_system" in
7169   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7170   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7171   gtk  )
7172        HAVE_X_WINDOWS=no
7173        test "$with_gnome" = "yes" && echo "  Using GNOME."
7174        test "$with_gnome" = "no" && echo "  Using GTK."
7175        ;;
7176   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7177 esac
7178
7179 case "$x_libraries" in *X11R4* )
7180   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7181   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7182 esac
7183
7184 echo "checking for WM_COMMAND option" 1>&6
7185 echo "configure:7186: checking for WM_COMMAND option" >&5;
7186 if test "$with_wmcommand" != "no"; then
7187   { test "$extra_verbose" = "yes" && cat << \EOF
7188     Defining HAVE_WMCOMMAND
7189 EOF
7190 cat >> confdefs.h <<\EOF
7191 #define HAVE_WMCOMMAND 1
7192 EOF
7193 }
7194
7195 fi
7196
7197 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7198 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7199 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7200 echo "configure:7201: checking for X11/Xauth.h" >&5
7201
7202 cat > conftest.$ac_ext <<EOF
7203 #line 7204 "configure"
7204 #include "confdefs.h"
7205 #include <X11/Xauth.h>
7206 EOF
7207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7208 { (eval echo configure:7209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7210 if test -z "$ac_err"; then
7211   rm -rf conftest*
7212   eval "ac_cv_header_$ac_safe=yes"
7213 else
7214   echo "$ac_err" >&5
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   eval "ac_cv_header_$ac_safe=no"
7219 fi
7220 rm -f conftest*
7221 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7222   echo "$ac_t""yes" 1>&6
7223   :
7224 else
7225   echo "$ac_t""no" 1>&6
7226 with_xauth=no
7227 fi
7228  }
7229 test -z "$with_xauth" && { 
7230 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7231 echo "configure:7232: checking for XauGetAuthByAddr in -lXau" >&5
7232 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7233
7234 xe_check_libs=" -lXau "
7235 cat > conftest.$ac_ext <<EOF
7236 #line 7237 "configure"
7237 #include "confdefs.h"
7238 /* Override any gcc2 internal prototype to avoid an error.  */
7239 /* We use char because int might match the return type of a gcc2
7240     builtin and then its argument prototype would still apply.  */
7241 char XauGetAuthByAddr();
7242
7243 int main() {
7244 XauGetAuthByAddr()
7245 ; return 0; }
7246 EOF
7247 if { (eval echo configure:7248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7248   rm -rf conftest*
7249   eval "ac_cv_lib_$ac_lib_var=yes"
7250 else
7251   echo "configure: failed program was:" >&5
7252   cat conftest.$ac_ext >&5
7253   rm -rf conftest*
7254   eval "ac_cv_lib_$ac_lib_var=no"
7255 fi
7256 rm -f conftest*
7257 xe_check_libs=""
7258
7259 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7260   echo "$ac_t""yes" 1>&6
7261   :
7262 else
7263   echo "$ac_t""no" 1>&6
7264 with_xauth=no
7265 fi
7266
7267  }
7268 test -z "$with_xauth" && with_xauth=yes
7269 if test "$with_xauth" = "yes"; then
7270   { test "$extra_verbose" = "yes" && cat << \EOF
7271     Defining HAVE_XAUTH
7272 EOF
7273 cat >> confdefs.h <<\EOF
7274 #define HAVE_XAUTH 1
7275 EOF
7276 }
7277
7278   
7279 T=""
7280 for W in $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
7281 libs_xauth="$T"
7282
7283 fi
7284
7285
7286
7287
7288 if test "$with_tooltalk" != "no" ; then
7289       for dir in "" "Tt/" "desktop/" ; do
7290     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7291 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7292 echo "configure:7293: checking for ${dir}tt_c.h" >&5
7293
7294 cat > conftest.$ac_ext <<EOF
7295 #line 7296 "configure"
7296 #include "confdefs.h"
7297 #include <${dir}tt_c.h>
7298 EOF
7299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7300 { (eval echo configure:7301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7302 if test -z "$ac_err"; then
7303   rm -rf conftest*
7304   eval "ac_cv_header_$ac_safe=yes"
7305 else
7306   echo "$ac_err" >&5
7307   echo "configure: failed program was:" >&5
7308   cat conftest.$ac_ext >&5
7309   rm -rf conftest*
7310   eval "ac_cv_header_$ac_safe=no"
7311 fi
7312 rm -f conftest*
7313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7314   echo "$ac_t""yes" 1>&6
7315   tt_c_h_file="${dir}tt_c.h"; break
7316 else
7317   echo "$ac_t""no" 1>&6
7318 fi
7319
7320   done
7321   if test -z "$tt_c_h_file"; then
7322     if test "$with_tooltalk" = "yes"; then
7323       (echo "$progname: Usage error:"
7324 echo " " "Unable to find required tooltalk header files."
7325 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7326     fi
7327     with_tooltalk=no
7328   fi
7329 fi
7330 if test "$with_tooltalk" != "no" ; then
7331   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7332     
7333 xe_msg_checking="for tt_message_create in -ltt"
7334 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7335 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7336 echo "configure:7337: checking "$xe_msg_checking"" >&5
7337 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7338
7339 xe_check_libs=" -ltt $extra_libs"
7340 cat > conftest.$ac_ext <<EOF
7341 #line 7342 "configure"
7342 #include "confdefs.h"
7343 /* Override any gcc2 internal prototype to avoid an error.  */
7344 /* We use char because int might match the return type of a gcc2
7345     builtin and then its argument prototype would still apply.  */
7346 char tt_message_create();
7347
7348 int main() {
7349 tt_message_create()
7350 ; return 0; }
7351 EOF
7352 if { (eval echo configure:7353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7353   rm -rf conftest*
7354   eval "ac_cv_lib_$ac_lib_var=yes"
7355 else
7356   echo "configure: failed program was:" >&5
7357   cat conftest.$ac_ext >&5
7358   rm -rf conftest*
7359   eval "ac_cv_lib_$ac_lib_var=no"
7360 fi
7361 rm -f conftest*
7362 xe_check_libs=""
7363
7364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7365   echo "$ac_t""yes" 1>&6
7366   tt_libs="-ltt $extra_libs"; break
7367 else
7368   echo "$ac_t""no" 1>&6
7369 :
7370 fi
7371
7372
7373   done
7374   if test -z "$tt_libs"; then
7375     if test "$with_tooltalk" = "yes"; then
7376       (echo "$progname: Usage error:"
7377 echo " " "Unable to find required tooltalk libraries."
7378 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7379     fi
7380     with_tooltalk=no
7381   fi
7382 fi
7383 test -z "$with_tooltalk" && with_tooltalk=yes
7384 if test "$with_tooltalk" = "yes"; then
7385   { test "$extra_verbose" = "yes" && cat << \EOF
7386     Defining TOOLTALK
7387 EOF
7388 cat >> confdefs.h <<\EOF
7389 #define TOOLTALK 1
7390 EOF
7391 }
7392
7393   { test "$extra_verbose" = "yes" && cat << EOF
7394     Defining TT_C_H_FILE = "$tt_c_h_file"
7395 EOF
7396 cat >> confdefs.h <<EOF
7397 #define TT_C_H_FILE "$tt_c_h_file"
7398 EOF
7399 }
7400
7401   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7402   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7403    echo "    xemacs will be linked with \"tooltalk.o\""
7404  fi
7405 fi
7406
7407 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7408 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7409 echo "configure:7410: checking for Dt/Dt.h" >&5
7410
7411 cat > conftest.$ac_ext <<EOF
7412 #line 7413 "configure"
7413 #include "confdefs.h"
7414 #include <Dt/Dt.h>
7415 EOF
7416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7417 { (eval echo configure:7418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7419 if test -z "$ac_err"; then
7420   rm -rf conftest*
7421   eval "ac_cv_header_$ac_safe=yes"
7422 else
7423   echo "$ac_err" >&5
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=no"
7428 fi
7429 rm -f conftest*
7430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7431   echo "$ac_t""yes" 1>&6
7432   :
7433 else
7434   echo "$ac_t""no" 1>&6
7435 with_cde=no
7436 fi
7437  }
7438 test -z "$with_cde" && { 
7439 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7440 echo "configure:7441: checking for DtDndDragStart in -lDtSvc" >&5
7441 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7442
7443 xe_check_libs=" -lDtSvc "
7444 cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 /* Override any gcc2 internal prototype to avoid an error.  */
7448 /* We use char because int might match the return type of a gcc2
7449     builtin and then its argument prototype would still apply.  */
7450 char DtDndDragStart();
7451
7452 int main() {
7453 DtDndDragStart()
7454 ; return 0; }
7455 EOF
7456 if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7457   rm -rf conftest*
7458   eval "ac_cv_lib_$ac_lib_var=yes"
7459 else
7460   echo "configure: failed program was:" >&5
7461   cat conftest.$ac_ext >&5
7462   rm -rf conftest*
7463   eval "ac_cv_lib_$ac_lib_var=no"
7464 fi
7465 rm -f conftest*
7466 xe_check_libs=""
7467
7468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7469   echo "$ac_t""yes" 1>&6
7470   :
7471 else
7472   echo "$ac_t""no" 1>&6
7473 with_cde=no
7474 fi
7475
7476  }
7477 test -z "$with_cde" && with_cde=yes
7478 if test "$with_dragndrop" = no; then
7479   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7480   with_cde=no
7481 fi
7482 if test "$with_cde" = "yes" ; then
7483   { test "$extra_verbose" = "yes" && cat << \EOF
7484     Defining HAVE_CDE
7485 EOF
7486 cat >> confdefs.h <<\EOF
7487 #define HAVE_CDE 1
7488 EOF
7489 }
7490
7491   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7492   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7493   with_tooltalk=yes # CDE requires Tooltalk
7494   need_motif=yes    # CDE requires Motif
7495 fi
7496
7497 test "$window_system" != "x11" && with_offix=no
7498 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7499   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7500   with_offix=no
7501 fi
7502 if test "$with_dragndrop" = no; then
7503   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7504   with_offix=no
7505 fi
7506 if test "$with_cde" = yes; then
7507   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7508   with_offix=no
7509 fi
7510 test -z "$with_offix" && with_offix=no
7511 if test "$with_offix" = "yes"; then
7512   { test "$extra_verbose" = "yes" && cat << \EOF
7513     Defining HAVE_OFFIX_DND
7514 EOF
7515 cat >> confdefs.h <<\EOF
7516 #define HAVE_OFFIX_DND 1
7517 EOF
7518 }
7519
7520   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7521   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7522 fi
7523 if test "$with_gtk" = "yes"; then
7524    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7525 fi
7526
7527 if test "$with_dragndrop" != "no" ; then
7528   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7529 echo "configure:7530: checking if drag and drop API is needed" >&5
7530   if test -n "$dragndrop_proto" ; then
7531     with_dragndrop=yes
7532     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7533     { test "$extra_verbose" = "yes" && cat << \EOF
7534     Defining HAVE_DRAGNDROP
7535 EOF
7536 cat >> confdefs.h <<\EOF
7537 #define HAVE_DRAGNDROP 1
7538 EOF
7539 }
7540
7541     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7542   else
7543     with_dragndrop=no
7544     echo "$ac_t""no" 1>&6
7545   fi
7546 fi
7547
7548 echo "checking for LDAP" 1>&6
7549 echo "configure:7550: checking for LDAP" >&5
7550 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7551 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7552 echo "configure:7553: checking for ldap.h" >&5
7553
7554 cat > conftest.$ac_ext <<EOF
7555 #line 7556 "configure"
7556 #include "confdefs.h"
7557 #include <ldap.h>
7558 EOF
7559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7560 { (eval echo configure:7561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7562 if test -z "$ac_err"; then
7563   rm -rf conftest*
7564   eval "ac_cv_header_$ac_safe=yes"
7565 else
7566   echo "$ac_err" >&5
7567   echo "configure: failed program was:" >&5
7568   cat conftest.$ac_ext >&5
7569   rm -rf conftest*
7570   eval "ac_cv_header_$ac_safe=no"
7571 fi
7572 rm -f conftest*
7573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7574   echo "$ac_t""yes" 1>&6
7575   :
7576 else
7577   echo "$ac_t""no" 1>&6
7578 with_ldap=no
7579 fi
7580  }
7581 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7582 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7583 echo "configure:7584: checking for lber.h" >&5
7584
7585 cat > conftest.$ac_ext <<EOF
7586 #line 7587 "configure"
7587 #include "confdefs.h"
7588 #include <lber.h>
7589 EOF
7590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7591 { (eval echo configure:7592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7593 if test -z "$ac_err"; then
7594   rm -rf conftest*
7595   eval "ac_cv_header_$ac_safe=yes"
7596 else
7597   echo "$ac_err" >&5
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_header_$ac_safe=no"
7602 fi
7603 rm -f conftest*
7604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7605   echo "$ac_t""yes" 1>&6
7606   :
7607 else
7608   echo "$ac_t""no" 1>&6
7609 with_ldap=no
7610 fi
7611  }
7612 if test "$with_ldap" != "no"; then
7613   
7614 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7615 echo "configure:7616: checking for ldap_search in -lldap" >&5
7616 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7617
7618 xe_check_libs=" -lldap "
7619 cat > conftest.$ac_ext <<EOF
7620 #line 7621 "configure"
7621 #include "confdefs.h"
7622 /* Override any gcc2 internal prototype to avoid an error.  */
7623 /* We use char because int might match the return type of a gcc2
7624     builtin and then its argument prototype would still apply.  */
7625 char ldap_search();
7626
7627 int main() {
7628 ldap_search()
7629 ; return 0; }
7630 EOF
7631 if { (eval echo configure:7632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7632   rm -rf conftest*
7633   eval "ac_cv_lib_$ac_lib_var=yes"
7634 else
7635   echo "configure: failed program was:" >&5
7636   cat conftest.$ac_ext >&5
7637   rm -rf conftest*
7638   eval "ac_cv_lib_$ac_lib_var=no"
7639 fi
7640 rm -f conftest*
7641 xe_check_libs=""
7642
7643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7644   echo "$ac_t""yes" 1>&6
7645   with_ldap_nolber=yes
7646 else
7647   echo "$ac_t""no" 1>&6
7648 with_ldap_nolber=no
7649 fi
7650
7651
7652   test "$with_ldap_nolber" = "no" && { 
7653 xe_msg_checking="for ldap_open in -lldap"
7654 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7655 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7656 echo "configure:7657: checking "$xe_msg_checking"" >&5
7657 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7658
7659 xe_check_libs=" -lldap -llber"
7660 cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* Override any gcc2 internal prototype to avoid an error.  */
7664 /* We use char because int might match the return type of a gcc2
7665     builtin and then its argument prototype would still apply.  */
7666 char ldap_open();
7667
7668 int main() {
7669 ldap_open()
7670 ; return 0; }
7671 EOF
7672 if { (eval echo configure:7673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=yes"
7675 else
7676   echo "configure: failed program was:" >&5
7677   cat conftest.$ac_ext >&5
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=no"
7680 fi
7681 rm -f conftest*
7682 xe_check_libs=""
7683
7684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7685   echo "$ac_t""yes" 1>&6
7686   with_ldap_lber=yes
7687 else
7688   echo "$ac_t""no" 1>&6
7689 with_ldap_lber=no
7690 fi
7691
7692  }
7693   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7694 xe_msg_checking="for ldap_open in -lldap"
7695 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7696 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7697 echo "configure:7698: checking "$xe_msg_checking"" >&5
7698 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7699
7700 xe_check_libs=" -lldap -llber -lkrb"
7701 cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 /* We use char because int might match the return type of a gcc2
7706     builtin and then its argument prototype would still apply.  */
7707 char ldap_open();
7708
7709 int main() {
7710 ldap_open()
7711 ; return 0; }
7712 EOF
7713 if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7714   rm -rf conftest*
7715   eval "ac_cv_lib_$ac_lib_var=yes"
7716 else
7717   echo "configure: failed program was:" >&5
7718   cat conftest.$ac_ext >&5
7719   rm -rf conftest*
7720   eval "ac_cv_lib_$ac_lib_var=no"
7721 fi
7722 rm -f conftest*
7723 xe_check_libs=""
7724
7725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7726   echo "$ac_t""yes" 1>&6
7727   with_ldap_krb=yes
7728 else
7729   echo "$ac_t""no" 1>&6
7730 with_ldap_krb=no
7731 fi
7732
7733  }
7734   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7735 xe_msg_checking="for ldap_open in -lldap"
7736 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7737 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7738 echo "configure:7739: checking "$xe_msg_checking"" >&5
7739 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7740
7741 xe_check_libs=" -lldap -llber -lkrb -ldes"
7742 cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745 /* Override any gcc2 internal prototype to avoid an error.  */
7746 /* We use char because int might match the return type of a gcc2
7747     builtin and then its argument prototype would still apply.  */
7748 char ldap_open();
7749
7750 int main() {
7751 ldap_open()
7752 ; return 0; }
7753 EOF
7754 if { (eval echo configure:7755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7755   rm -rf conftest*
7756   eval "ac_cv_lib_$ac_lib_var=yes"
7757 else
7758   echo "configure: failed program was:" >&5
7759   cat conftest.$ac_ext >&5
7760   rm -rf conftest*
7761   eval "ac_cv_lib_$ac_lib_var=no"
7762 fi
7763 rm -f conftest*
7764 xe_check_libs=""
7765
7766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7767   echo "$ac_t""yes" 1>&6
7768   with_ldap_krbdes=yes
7769 else
7770   echo "$ac_t""no" 1>&6
7771 with_ldap_krbdes=no
7772 fi
7773
7774  }
7775   test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
7776 fi
7777 if test "$with_ldap" = "yes"; then
7778   { test "$extra_verbose" = "yes" && cat << \EOF
7779     Defining HAVE_LDAP
7780 EOF
7781 cat >> confdefs.h <<\EOF
7782 #define HAVE_LDAP 1
7783 EOF
7784 }
7785
7786   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7787    echo "    xemacs will be linked with \"eldap.o\""
7788  fi
7789   if test "$with_ldap_nolber" = "yes" ; then
7790     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7791   else
7792     if test "$with_ldap_krb" = "yes" ; then
7793       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7794     fi
7795     if test "$with_ldap_krbdes" = "yes" ; then
7796       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7797       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7798     fi
7799     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7800     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7801   fi
7802   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7803 do
7804 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7805 echo "configure:7806: checking for $ac_func" >&5
7806
7807 cat > conftest.$ac_ext <<EOF
7808 #line 7809 "configure"
7809 #include "confdefs.h"
7810 /* System header to define __stub macros and hopefully few prototypes,
7811     which can conflict with char $ac_func(); below.  */
7812 #include <assert.h>
7813 /* Override any gcc2 internal prototype to avoid an error.  */
7814 /* We use char because int might match the return type of a gcc2
7815     builtin and then its argument prototype would still apply.  */
7816 char $ac_func();
7817
7818 int main() {
7819
7820 /* The GNU C library defines this for functions which it implements
7821     to always fail with ENOSYS.  Some functions are actually named
7822     something starting with __ and the normal name is an alias.  */
7823 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7824 choke me
7825 #else
7826 $ac_func();
7827 #endif
7828
7829 ; return 0; }
7830 EOF
7831 if { (eval echo configure:7832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7832   rm -rf conftest*
7833   eval "ac_cv_func_$ac_func=yes"
7834 else
7835   echo "configure: failed program was:" >&5
7836   cat conftest.$ac_ext >&5
7837   rm -rf conftest*
7838   eval "ac_cv_func_$ac_func=no"
7839 fi
7840 rm -f conftest*
7841
7842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7843   echo "$ac_t""yes" 1>&6
7844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7845   { test "$extra_verbose" = "yes" && cat << EOF
7846     Defining $ac_tr_func
7847 EOF
7848 cat >> confdefs.h <<EOF
7849 #define $ac_tr_func 1
7850 EOF
7851 }
7852  
7853 else
7854   echo "$ac_t""no" 1>&6
7855 fi
7856 done
7857
7858 fi
7859
7860 if test "$with_postgresql" != "no"; then
7861   echo "checking for PostgreSQL" 1>&6
7862 echo "configure:7863: checking for PostgreSQL" >&5
7863
7864   for header_dir in "" "pgsql/" "postgresql/"; do
7865     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7866 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7867 echo "configure:7868: checking for ${header_dir}libpq-fe.h" >&5
7868
7869 cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872 #include <${header_dir}libpq-fe.h>
7873 EOF
7874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7875 { (eval echo configure:7876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7877 if test -z "$ac_err"; then
7878   rm -rf conftest*
7879   eval "ac_cv_header_$ac_safe=yes"
7880 else
7881   echo "$ac_err" >&5
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   eval "ac_cv_header_$ac_safe=no"
7886 fi
7887 rm -f conftest*
7888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7889   echo "$ac_t""yes" 1>&6
7890   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7891 else
7892   echo "$ac_t""no" 1>&6
7893 fi
7894
7895   done
7896
7897   test -n "$libpq_fe_h_file" && { 
7898 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7899 echo "configure:7900: checking for PQconnectdb in -lpq" >&5
7900 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7901
7902 xe_check_libs=" -lpq "
7903 cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7906 /* Override any gcc2 internal prototype to avoid an error.  */
7907 /* We use char because int might match the return type of a gcc2
7908     builtin and then its argument prototype would still apply.  */
7909 char PQconnectdb();
7910
7911 int main() {
7912 PQconnectdb()
7913 ; return 0; }
7914 EOF
7915 if { (eval echo configure:7916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7916   rm -rf conftest*
7917   eval "ac_cv_lib_$ac_lib_var=yes"
7918 else
7919   echo "configure: failed program was:" >&5
7920   cat conftest.$ac_ext >&5
7921   rm -rf conftest*
7922   eval "ac_cv_lib_$ac_lib_var=no"
7923 fi
7924 rm -f conftest*
7925 xe_check_libs=""
7926
7927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7928   echo "$ac_t""yes" 1>&6
7929   have_libpq=yes
7930 else
7931   echo "$ac_t""no" 1>&6
7932 fi
7933
7934  }
7935
7936   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7937     with_postgresql=yes
7938     { test "$extra_verbose" = "yes" && cat << \EOF
7939     Defining HAVE_POSTGRESQL
7940 EOF
7941 cat >> confdefs.h <<\EOF
7942 #define HAVE_POSTGRESQL 1
7943 EOF
7944 }
7945
7946     
7947 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7948 echo "configure:7949: checking for PQconnectStart in -lpq" >&5
7949 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7950
7951 xe_check_libs=" -lpq "
7952 cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955 /* Override any gcc2 internal prototype to avoid an error.  */
7956 /* We use char because int might match the return type of a gcc2
7957     builtin and then its argument prototype would still apply.  */
7958 char PQconnectStart();
7959
7960 int main() {
7961 PQconnectStart()
7962 ; return 0; }
7963 EOF
7964 if { (eval echo configure:7965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7965   rm -rf conftest*
7966   eval "ac_cv_lib_$ac_lib_var=yes"
7967 else
7968   echo "configure: failed program was:" >&5
7969   cat conftest.$ac_ext >&5
7970   rm -rf conftest*
7971   eval "ac_cv_lib_$ac_lib_var=no"
7972 fi
7973 rm -f conftest*
7974 xe_check_libs=""
7975
7976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7977   echo "$ac_t""yes" 1>&6
7978   with_postgresqlv7=yes;
7979                  { test "$extra_verbose" = "yes" && cat << \EOF
7980     Defining HAVE_POSTGRESQLV7
7981 EOF
7982 cat >> confdefs.h <<\EOF
7983 #define HAVE_POSTGRESQLV7 1
7984 EOF
7985 }
7986
7987 else
7988   echo "$ac_t""no" 1>&6
7989 fi
7990
7991
7992     { test "$extra_verbose" = "yes" && cat << EOF
7993     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7994 EOF
7995 cat >> confdefs.h <<EOF
7996 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7997 EOF
7998 }
7999
8000     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8001     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8002    echo "    xemacs will be linked with \"postgresql.o\""
8003  fi
8004   elif test "$with_postgresql" = "yes"; then
8005     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8006   fi
8007 fi
8008
8009
8010 if test "$window_system" != "none"; then
8011   echo "checking for graphics libraries" 1>&6
8012 echo "configure:8013: checking for graphics libraries" >&5
8013
8014     xpm_problem=""
8015   if test -z "$with_xpm"; then
8016     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8017 echo "configure:8018: checking for Xpm - no older than 3.4f" >&5
8018     xe_check_libs=-lXpm
8019     cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 #define XPM_NUMBERS
8023 #include <X11/xpm.h>
8024     int main(int c, char **v) {
8025     return c == 1 ? 0 :
8026       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8027       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8028 EOF
8029 if { (eval echo configure:8030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8030 then
8031   ./conftest dummy_arg; xpm_status=$?;
8032       if test "$xpm_status" = "0"; then
8033         with_xpm=yes;
8034       else
8035         with_xpm=no;
8036         if test "$xpm_status" = "1"; then
8037           xpm_problem="Xpm library version and header file version don't match!"
8038         elif test "$xpm_status" = "2"; then
8039           xpm_problem="Xpm library version is too old!"
8040         else
8041           xpm_problem="Internal xpm detection logic error!"
8042         fi
8043         echo "
8044 *** WARNING *** $xpm_problem
8045   I'm not touching that with a 10-foot pole!
8046   If you really want to use the installed version of Xpm, rerun
8047   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8048     fi
8049 else
8050   conftest_rc="$?"
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -fr conftest*
8054   with_xpm=no
8055 fi
8056 rm -fr conftest*
8057     xe_check_libs=
8058     echo "$ac_t""$with_xpm" 1>&6
8059   fi
8060   if test "$with_xpm" = "yes"; then
8061                 { test "$extra_verbose" = "yes" && cat << \EOF
8062     Defining HAVE_XPM
8063 EOF
8064 cat >> confdefs.h <<\EOF
8065 #define HAVE_XPM 1
8066 EOF
8067 }
8068
8069     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8070     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8071 echo "configure:8072: checking for \"FOR_MSW\" xpm" >&5
8072     xe_check_libs=-lXpm
8073     cat > conftest.$ac_ext <<EOF
8074 #line 8075 "configure"
8075 #include "confdefs.h"
8076
8077 int main() {
8078 XpmCreatePixmapFromData()
8079 ; return 0; }
8080 EOF
8081 if { (eval echo configure:8082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8082   rm -rf conftest*
8083   xpm_for_msw=no
8084 else
8085   echo "configure: failed program was:" >&5
8086   cat conftest.$ac_ext >&5
8087   rm -rf conftest*
8088   xpm_for_msw=yes
8089 fi
8090 rm -f conftest*
8091     xe_check_libs=
8092     echo "$ac_t""$xpm_for_msw" 1>&6
8093     if test "$xpm_for_msw" = "yes"; then
8094       { test "$extra_verbose" = "yes" && cat << \EOF
8095     Defining FOR_MSW
8096 EOF
8097 cat >> confdefs.h <<\EOF
8098 #define FOR_MSW 1
8099 EOF
8100 }
8101
8102     fi
8103   fi
8104
8105     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8106 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8107 echo "configure:8108: checking for compface.h" >&5
8108
8109 cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 #include <compface.h>
8113 EOF
8114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8115 { (eval echo configure:8116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8117 if test -z "$ac_err"; then
8118   rm -rf conftest*
8119   eval "ac_cv_header_$ac_safe=yes"
8120 else
8121   echo "$ac_err" >&5
8122   echo "configure: failed program was:" >&5
8123   cat conftest.$ac_ext >&5
8124   rm -rf conftest*
8125   eval "ac_cv_header_$ac_safe=no"
8126 fi
8127 rm -f conftest*
8128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8129   echo "$ac_t""yes" 1>&6
8130   :
8131 else
8132   echo "$ac_t""no" 1>&6
8133 with_xface=no
8134 fi
8135  }
8136   test -z "$with_xface" && { 
8137 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8138 echo "configure:8139: checking for UnGenFace in -lcompface" >&5
8139 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8140
8141 xe_check_libs=" -lcompface "
8142 cat > conftest.$ac_ext <<EOF
8143 #line 8144 "configure"
8144 #include "confdefs.h"
8145 /* Override any gcc2 internal prototype to avoid an error.  */
8146 /* We use char because int might match the return type of a gcc2
8147     builtin and then its argument prototype would still apply.  */
8148 char UnGenFace();
8149
8150 int main() {
8151 UnGenFace()
8152 ; return 0; }
8153 EOF
8154 if { (eval echo configure:8155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8155   rm -rf conftest*
8156   eval "ac_cv_lib_$ac_lib_var=yes"
8157 else
8158   echo "configure: failed program was:" >&5
8159   cat conftest.$ac_ext >&5
8160   rm -rf conftest*
8161   eval "ac_cv_lib_$ac_lib_var=no"
8162 fi
8163 rm -f conftest*
8164 xe_check_libs=""
8165
8166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8167   echo "$ac_t""yes" 1>&6
8168   : 
8169 else
8170   echo "$ac_t""no" 1>&6
8171 with_xface=no
8172 fi
8173
8174  }
8175   test -z "$with_xface" && with_xface=yes
8176   if test "$with_xface" = "yes"; then
8177     { test "$extra_verbose" = "yes" && cat << \EOF
8178     Defining HAVE_XFACE
8179 EOF
8180 cat >> confdefs.h <<\EOF
8181 #define HAVE_XFACE 1
8182 EOF
8183 }
8184
8185     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8186   fi
8187
8188         if test "$with_gif" != "no"; then
8189     with_gif="yes"
8190     { test "$extra_verbose" = "yes" && cat << \EOF
8191     Defining HAVE_GIF
8192 EOF
8193 cat >> confdefs.h <<\EOF
8194 #define HAVE_GIF 1
8195 EOF
8196 }
8197
8198     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8199    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8200  fi
8201   fi
8202
8203       if test "$with_png $with_tiff" != "no no"; then
8204     
8205 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8206 echo "configure:8207: checking for inflate in -lc" >&5
8207 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8208
8209 xe_check_libs=" -lc "
8210 cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 /* Override any gcc2 internal prototype to avoid an error.  */
8214 /* We use char because int might match the return type of a gcc2
8215     builtin and then its argument prototype would still apply.  */
8216 char inflate();
8217
8218 int main() {
8219 inflate()
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   eval "ac_cv_lib_$ac_lib_var=yes"
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   eval "ac_cv_lib_$ac_lib_var=no"
8230 fi
8231 rm -f conftest*
8232 xe_check_libs=""
8233
8234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8235   echo "$ac_t""yes" 1>&6
8236   :
8237 else
8238   echo "$ac_t""no" 1>&6
8239
8240 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8241 echo "configure:8242: checking for inflate in -lz" >&5
8242 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8243
8244 xe_check_libs=" -lz "
8245 cat > conftest.$ac_ext <<EOF
8246 #line 8247 "configure"
8247 #include "confdefs.h"
8248 /* Override any gcc2 internal prototype to avoid an error.  */
8249 /* We use char because int might match the return type of a gcc2
8250     builtin and then its argument prototype would still apply.  */
8251 char inflate();
8252
8253 int main() {
8254 inflate()
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8258   rm -rf conftest*
8259   eval "ac_cv_lib_$ac_lib_var=yes"
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   eval "ac_cv_lib_$ac_lib_var=no"
8265 fi
8266 rm -f conftest*
8267 xe_check_libs=""
8268
8269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8270   echo "$ac_t""yes" 1>&6
8271   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8272 else
8273   echo "$ac_t""no" 1>&6
8274
8275 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8276 echo "configure:8277: checking for inflate in -lgz" >&5
8277 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8278
8279 xe_check_libs=" -lgz "
8280 cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 /* Override any gcc2 internal prototype to avoid an error.  */
8284 /* We use char because int might match the return type of a gcc2
8285     builtin and then its argument prototype would still apply.  */
8286 char inflate();
8287
8288 int main() {
8289 inflate()
8290 ; return 0; }
8291 EOF
8292 if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8293   rm -rf conftest*
8294   eval "ac_cv_lib_$ac_lib_var=yes"
8295 else
8296   echo "configure: failed program was:" >&5
8297   cat conftest.$ac_ext >&5
8298   rm -rf conftest*
8299   eval "ac_cv_lib_$ac_lib_var=no"
8300 fi
8301 rm -f conftest*
8302 xe_check_libs=""
8303
8304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8305   echo "$ac_t""yes" 1>&6
8306   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310
8311
8312 fi
8313
8314
8315 fi
8316
8317
8318   fi
8319
8320     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8321 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8322 echo "configure:8323: checking for jpeglib.h" >&5
8323
8324 cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 #include <jpeglib.h>
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=yes"
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=no"
8341 fi
8342 rm -f conftest*
8343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8344   echo "$ac_t""yes" 1>&6
8345   :
8346 else
8347   echo "$ac_t""no" 1>&6
8348 with_jpeg=no
8349 fi
8350  }
8351   test -z "$with_jpeg" && { 
8352 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8353 echo "configure:8354: checking for jpeg_destroy_decompress in -ljpeg" >&5
8354 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8355
8356 xe_check_libs=" -ljpeg "
8357 cat > conftest.$ac_ext <<EOF
8358 #line 8359 "configure"
8359 #include "confdefs.h"
8360 /* Override any gcc2 internal prototype to avoid an error.  */
8361 /* We use char because int might match the return type of a gcc2
8362     builtin and then its argument prototype would still apply.  */
8363 char jpeg_destroy_decompress();
8364
8365 int main() {
8366 jpeg_destroy_decompress()
8367 ; return 0; }
8368 EOF
8369 if { (eval echo configure:8370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8370   rm -rf conftest*
8371   eval "ac_cv_lib_$ac_lib_var=yes"
8372 else
8373   echo "configure: failed program was:" >&5
8374   cat conftest.$ac_ext >&5
8375   rm -rf conftest*
8376   eval "ac_cv_lib_$ac_lib_var=no"
8377 fi
8378 rm -f conftest*
8379 xe_check_libs=""
8380
8381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8382   echo "$ac_t""yes" 1>&6
8383   :
8384 else
8385   echo "$ac_t""no" 1>&6
8386 with_jpeg=no
8387 fi
8388
8389  }
8390   test -z "$with_jpeg" && with_jpeg=yes
8391   if test "$with_jpeg" = "yes"; then
8392     { test "$extra_verbose" = "yes" && cat << \EOF
8393     Defining HAVE_JPEG
8394 EOF
8395 cat >> confdefs.h <<\EOF
8396 #define HAVE_JPEG 1
8397 EOF
8398 }
8399
8400     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8401   fi
8402
8403     png_problem=""
8404   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8405 echo "configure:8406: checking for pow" >&5
8406
8407 cat > conftest.$ac_ext <<EOF
8408 #line 8409 "configure"
8409 #include "confdefs.h"
8410 /* System header to define __stub macros and hopefully few prototypes,
8411     which can conflict with char pow(); below.  */
8412 #include <assert.h>
8413 /* Override any gcc2 internal prototype to avoid an error.  */
8414 /* We use char because int might match the return type of a gcc2
8415     builtin and then its argument prototype would still apply.  */
8416 char pow();
8417
8418 int main() {
8419
8420 /* The GNU C library defines this for functions which it implements
8421     to always fail with ENOSYS.  Some functions are actually named
8422     something starting with __ and the normal name is an alias.  */
8423 #if defined (__stub_pow) || defined (__stub___pow)
8424 choke me
8425 #else
8426 pow();
8427 #endif
8428
8429 ; return 0; }
8430 EOF
8431 if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8432   rm -rf conftest*
8433   eval "ac_cv_func_pow=yes"
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   eval "ac_cv_func_pow=no"
8439 fi
8440 rm -f conftest*
8441
8442 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8443   echo "$ac_t""yes" 1>&6
8444   :
8445 else
8446   echo "$ac_t""no" 1>&6
8447 with_png=no
8448 fi
8449  }
8450   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8451 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8452 echo "configure:8453: checking for png.h" >&5
8453
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 #include <png.h>
8458 EOF
8459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8460 { (eval echo configure:8461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8462 if test -z "$ac_err"; then
8463   rm -rf conftest*
8464   eval "ac_cv_header_$ac_safe=yes"
8465 else
8466   echo "$ac_err" >&5
8467   echo "configure: failed program was:" >&5
8468   cat conftest.$ac_ext >&5
8469   rm -rf conftest*
8470   eval "ac_cv_header_$ac_safe=no"
8471 fi
8472 rm -f conftest*
8473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8474   echo "$ac_t""yes" 1>&6
8475   :
8476 else
8477   echo "$ac_t""no" 1>&6
8478 with_png=no
8479 fi
8480  }
8481   test -z "$with_png" && { 
8482 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8483 echo "configure:8484: checking for png_read_image in -lpng" >&5
8484 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8485
8486 xe_check_libs=" -lpng "
8487 cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 /* Override any gcc2 internal prototype to avoid an error.  */
8491 /* We use char because int might match the return type of a gcc2
8492     builtin and then its argument prototype would still apply.  */
8493 char png_read_image();
8494
8495 int main() {
8496 png_read_image()
8497 ; return 0; }
8498 EOF
8499 if { (eval echo configure:8500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8500   rm -rf conftest*
8501   eval "ac_cv_lib_$ac_lib_var=yes"
8502 else
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   eval "ac_cv_lib_$ac_lib_var=no"
8507 fi
8508 rm -f conftest*
8509 xe_check_libs=""
8510
8511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8512   echo "$ac_t""yes" 1>&6
8513   :
8514 else
8515   echo "$ac_t""no" 1>&6
8516 with_png=no
8517 fi
8518
8519  }
8520   if test -z "$with_png"; then
8521     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8522 echo "configure:8523: checking for workable png version information" >&5
8523     xe_check_libs="-lpng -lz"
8524     cat > conftest.$ac_ext <<EOF
8525 #line 8526 "configure"
8526 #include "confdefs.h"
8527 #include <png.h>
8528     int main(int c, char **v) {
8529     if (c == 1) return 0;
8530     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8531     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8532 EOF
8533 if { (eval echo configure:8534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8534 then
8535   ./conftest dummy_arg; png_status=$?;
8536       if test "$png_status" = "0"; then
8537         with_png=yes;
8538       else
8539         with_png=no;
8540         if test "$png_status" = "1"; then
8541           png_problem="PNG library version and header file don't match!"
8542         elif test "$png_status" = "2"; then
8543           png_problem="PNG library version too old (pre 1.0.2)!"
8544         fi
8545         echo "
8546 *** WARNING *** $png_problem
8547   I'm not touching that with a 10-foot pole!
8548   If you really want to use the installed version of libPNG, rerun
8549   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8550     fi
8551 else
8552   conftest_rc="$?"
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -fr conftest*
8556   with_png=no
8557 fi
8558 rm -fr conftest*
8559     xe_check_libs=
8560     echo "$ac_t""$with_png" 1>&6
8561   fi
8562   if test "$with_png" = "yes"; then
8563     { test "$extra_verbose" = "yes" && cat << \EOF
8564     Defining HAVE_PNG
8565 EOF
8566 cat >> confdefs.h <<\EOF
8567 #define HAVE_PNG 1
8568 EOF
8569 }
8570
8571     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8572   fi
8573
8574     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8575 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8576 echo "configure:8577: checking for tiffio.h" >&5
8577
8578 cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581 #include <tiffio.h>
8582 EOF
8583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8584 { (eval echo configure:8585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8586 if test -z "$ac_err"; then
8587   rm -rf conftest*
8588   eval "ac_cv_header_$ac_safe=yes"
8589 else
8590   echo "$ac_err" >&5
8591   echo "configure: failed program was:" >&5
8592   cat conftest.$ac_ext >&5
8593   rm -rf conftest*
8594   eval "ac_cv_header_$ac_safe=no"
8595 fi
8596 rm -f conftest*
8597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8598   echo "$ac_t""yes" 1>&6
8599   :
8600 else
8601   echo "$ac_t""no" 1>&6
8602 with_tiff=no
8603 fi
8604  }
8605   test -z "$with_tiff" && { 
8606 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8607 echo "configure:8608: checking for TIFFClientOpen in -ltiff" >&5
8608 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8609
8610 xe_check_libs=" -ltiff "
8611 cat > conftest.$ac_ext <<EOF
8612 #line 8613 "configure"
8613 #include "confdefs.h"
8614 /* Override any gcc2 internal prototype to avoid an error.  */
8615 /* We use char because int might match the return type of a gcc2
8616     builtin and then its argument prototype would still apply.  */
8617 char TIFFClientOpen();
8618
8619 int main() {
8620 TIFFClientOpen()
8621 ; return 0; }
8622 EOF
8623 if { (eval echo configure:8624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8624   rm -rf conftest*
8625   eval "ac_cv_lib_$ac_lib_var=yes"
8626 else
8627   echo "configure: failed program was:" >&5
8628   cat conftest.$ac_ext >&5
8629   rm -rf conftest*
8630   eval "ac_cv_lib_$ac_lib_var=no"
8631 fi
8632 rm -f conftest*
8633 xe_check_libs=""
8634
8635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8636   echo "$ac_t""yes" 1>&6
8637   :
8638 else
8639   echo "$ac_t""no" 1>&6
8640 with_tiff=no
8641 fi
8642
8643  }
8644   test -z "$with_tiff" && with_tiff=yes
8645   if test "$with_tiff" = "yes"; then
8646     { test "$extra_verbose" = "yes" && cat << \EOF
8647     Defining HAVE_TIFF
8648 EOF
8649 cat >> confdefs.h <<\EOF
8650 #define HAVE_TIFF 1
8651 EOF
8652 }
8653
8654     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8655   fi
8656 fi
8657
8658
8659 if test "$with_gtk" = "yes"; then
8660     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8661 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8662 echo "configure:8663: checking for compface.h" >&5
8663
8664 cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667 #include <compface.h>
8668 EOF
8669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8670 { (eval echo configure:8671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8672 if test -z "$ac_err"; then
8673   rm -rf conftest*
8674   eval "ac_cv_header_$ac_safe=yes"
8675 else
8676   echo "$ac_err" >&5
8677   echo "configure: failed program was:" >&5
8678   cat conftest.$ac_ext >&5
8679   rm -rf conftest*
8680   eval "ac_cv_header_$ac_safe=no"
8681 fi
8682 rm -f conftest*
8683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8684   echo "$ac_t""yes" 1>&6
8685   :
8686 else
8687   echo "$ac_t""no" 1>&6
8688 with_xface=no
8689 fi
8690  }
8691   test -z "$with_xface" && { 
8692 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8693 echo "configure:8694: checking for UnGenFace in -lcompface" >&5
8694 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8695
8696 xe_check_libs=" -lcompface "
8697 cat > conftest.$ac_ext <<EOF
8698 #line 8699 "configure"
8699 #include "confdefs.h"
8700 /* Override any gcc2 internal prototype to avoid an error.  */
8701 /* We use char because int might match the return type of a gcc2
8702     builtin and then its argument prototype would still apply.  */
8703 char UnGenFace();
8704
8705 int main() {
8706 UnGenFace()
8707 ; return 0; }
8708 EOF
8709 if { (eval echo configure:8710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8710   rm -rf conftest*
8711   eval "ac_cv_lib_$ac_lib_var=yes"
8712 else
8713   echo "configure: failed program was:" >&5
8714   cat conftest.$ac_ext >&5
8715   rm -rf conftest*
8716   eval "ac_cv_lib_$ac_lib_var=no"
8717 fi
8718 rm -f conftest*
8719 xe_check_libs=""
8720
8721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8722   echo "$ac_t""yes" 1>&6
8723   : 
8724 else
8725   echo "$ac_t""no" 1>&6
8726 with_xface=no
8727 fi
8728
8729  }
8730   test -z "$with_xface" && with_xface=yes
8731   if test "$with_xface" = "yes"; then
8732     { test "$extra_verbose" = "yes" && cat << \EOF
8733     Defining HAVE_XFACE
8734 EOF
8735 cat >> confdefs.h <<\EOF
8736 #define HAVE_XFACE 1
8737 EOF
8738 }
8739
8740     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8741   fi
8742 fi
8743
8744
8745
8746 if test "$with_x11" = "yes"; then
8747
8748   echo "checking for X11 graphics libraries" 1>&6
8749 echo "configure:8750: checking for X11 graphics libraries" >&5
8750
8751   echo "checking for the Athena widgets" 1>&6
8752 echo "configure:8753: checking for the Athena widgets" >&5
8753
8754     case "$with_athena" in
8755         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8756     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8757     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8758     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8759     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8760     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8761   esac
8762
8763     if test "$athena_3d" = "no"; then
8764     
8765 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8766 echo "configure:8767: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8767 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8768
8769 xe_check_libs=" -l$athena_variant "
8770 cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 /* Override any gcc2 internal prototype to avoid an error.  */
8774 /* We use char because int might match the return type of a gcc2
8775     builtin and then its argument prototype would still apply.  */
8776 char XawScrollbarSetThumb();
8777
8778 int main() {
8779 XawScrollbarSetThumb()
8780 ; return 0; }
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8783   rm -rf conftest*
8784   eval "ac_cv_lib_$ac_lib_var=yes"
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -rf conftest*
8789   eval "ac_cv_lib_$ac_lib_var=no"
8790 fi
8791 rm -f conftest*
8792 xe_check_libs=""
8793
8794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8795   echo "$ac_t""yes" 1>&6
8796           
8797 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8798 echo "configure:8799: checking for threeDClassRec in -l$athena_variant" >&5
8799 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8800
8801 xe_check_libs=" -l$athena_variant "
8802 cat > conftest.$ac_ext <<EOF
8803 #line 8804 "configure"
8804 #include "confdefs.h"
8805 /* Override any gcc2 internal prototype to avoid an error.  */
8806 /* We use char because int might match the return type of a gcc2
8807     builtin and then its argument prototype would still apply.  */
8808 char threeDClassRec();
8809
8810 int main() {
8811 threeDClassRec()
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8815   rm -rf conftest*
8816   eval "ac_cv_lib_$ac_lib_var=yes"
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820   rm -rf conftest*
8821   eval "ac_cv_lib_$ac_lib_var=no"
8822 fi
8823 rm -f conftest*
8824 xe_check_libs=""
8825
8826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8827   echo "$ac_t""yes" 1>&6
8828   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8829 else
8830   echo "$ac_t""no" 1>&6
8831 athena_lib=$athena_variant
8832 fi
8833
8834
8835       
8836 else
8837   echo "$ac_t""no" 1>&6
8838 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8839 fi
8840
8841
8842   else
8843         
8844 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8845 echo "configure:8846: checking for threeDClassRec in -l$athena_variant" >&5
8846 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8847
8848 xe_check_libs=" -l$athena_variant "
8849 cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* Override any gcc2 internal prototype to avoid an error.  */
8853 /* We use char because int might match the return type of a gcc2
8854     builtin and then its argument prototype would still apply.  */
8855 char threeDClassRec();
8856
8857 int main() {
8858 threeDClassRec()
8859 ; return 0; }
8860 EOF
8861 if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8862   rm -rf conftest*
8863   eval "ac_cv_lib_$ac_lib_var=yes"
8864 else
8865   echo "configure: failed program was:" >&5
8866   cat conftest.$ac_ext >&5
8867   rm -rf conftest*
8868   eval "ac_cv_lib_$ac_lib_var=no"
8869 fi
8870 rm -f conftest*
8871 xe_check_libs=""
8872
8873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8874   echo "$ac_t""yes" 1>&6
8875   athena_lib=$athena_variant
8876 else
8877   echo "$ac_t""no" 1>&6
8878 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8879 echo "configure:8880: checking for threeDClassRec in -lXaw" >&5
8880 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8881
8882 xe_check_libs=" -lXaw "
8883 cat > conftest.$ac_ext <<EOF
8884 #line 8885 "configure"
8885 #include "confdefs.h"
8886 /* Override any gcc2 internal prototype to avoid an error.  */
8887 /* We use char because int might match the return type of a gcc2
8888     builtin and then its argument prototype would still apply.  */
8889 char threeDClassRec();
8890
8891 int main() {
8892 threeDClassRec()
8893 ; return 0; }
8894 EOF
8895 if { (eval echo configure:8896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8896   rm -rf conftest*
8897   eval "ac_cv_lib_$ac_lib_var=yes"
8898 else
8899   echo "configure: failed program was:" >&5
8900   cat conftest.$ac_ext >&5
8901   rm -rf conftest*
8902   eval "ac_cv_lib_$ac_lib_var=no"
8903 fi
8904 rm -f conftest*
8905 xe_check_libs=""
8906
8907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8908   echo "$ac_t""yes" 1>&6
8909   athena_lib=Xaw;
8910           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8911         
8912 else
8913   echo "$ac_t""no" 1>&6
8914 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8915 fi
8916
8917
8918 fi
8919
8920
8921   fi
8922
8923     if test "$athena_3d" = "no"; then
8924     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8925 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8926 echo "configure:8927: checking for X11/Xaw/ThreeD.h" >&5
8927
8928 cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931 #include <X11/Xaw/ThreeD.h>
8932 EOF
8933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8934 { (eval echo configure:8935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8936 if test -z "$ac_err"; then
8937   rm -rf conftest*
8938   eval "ac_cv_header_$ac_safe=yes"
8939 else
8940   echo "$ac_err" >&5
8941   echo "configure: failed program was:" >&5
8942   cat conftest.$ac_ext >&5
8943   rm -rf conftest*
8944   eval "ac_cv_header_$ac_safe=no"
8945 fi
8946 rm -f conftest*
8947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8948   echo "$ac_t""yes" 1>&6
8949   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8950 else
8951   echo "$ac_t""no" 1>&6
8952 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8953 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8954 echo "configure:8955: checking for X11/Xaw/XawInit.h" >&5
8955
8956 cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 #include <X11/Xaw/XawInit.h>
8960 EOF
8961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8962 { (eval echo configure:8963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8964 if test -z "$ac_err"; then
8965   rm -rf conftest*
8966   eval "ac_cv_header_$ac_safe=yes"
8967 else
8968   echo "$ac_err" >&5
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_header_$ac_safe=no"
8973 fi
8974 rm -f conftest*
8975 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8976   echo "$ac_t""yes" 1>&6
8977   athena_h_path=X11/Xaw
8978 else
8979   echo "$ac_t""no" 1>&6
8980 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8981 fi
8982
8983 fi
8984
8985   else
8986             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8987 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8988 echo "configure:8989: checking for X11/$athena_variant/XawInit.h" >&5
8989
8990 cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 #include <X11/$athena_variant/XawInit.h>
8994 EOF
8995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8996 { (eval echo configure:8997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8998 if test -z "$ac_err"; then
8999   rm -rf conftest*
9000   eval "ac_cv_header_$ac_safe=yes"
9001 else
9002   echo "$ac_err" >&5
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -rf conftest*
9006   eval "ac_cv_header_$ac_safe=no"
9007 fi
9008 rm -f conftest*
9009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9010   echo "$ac_t""yes" 1>&6
9011   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9012 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9013 echo "configure:9014: checking for X11/$athena_variant/ThreeD.h" >&5
9014
9015 cat > conftest.$ac_ext <<EOF
9016 #line 9017 "configure"
9017 #include "confdefs.h"
9018 #include <X11/$athena_variant/ThreeD.h>
9019 EOF
9020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9021 { (eval echo configure:9022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9023 if test -z "$ac_err"; then
9024   rm -rf conftest*
9025   eval "ac_cv_header_$ac_safe=yes"
9026 else
9027   echo "$ac_err" >&5
9028   echo "configure: failed program was:" >&5
9029   cat conftest.$ac_ext >&5
9030   rm -rf conftest*
9031   eval "ac_cv_header_$ac_safe=no"
9032 fi
9033 rm -f conftest*
9034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9035   echo "$ac_t""yes" 1>&6
9036   athena_h_path=X11/$athena_variant
9037 else
9038   echo "$ac_t""no" 1>&6
9039 fi
9040
9041 else
9042   echo "$ac_t""no" 1>&6
9043 fi
9044
9045
9046         if test -z "$athena_h_path"; then
9047       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9048 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9049 echo "configure:9050: checking for $athena_variant/XawInit.h" >&5
9050
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 #include <$athena_variant/XawInit.h>
9055 EOF
9056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9057 { (eval echo configure:9058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9059 if test -z "$ac_err"; then
9060   rm -rf conftest*
9061   eval "ac_cv_header_$ac_safe=yes"
9062 else
9063   echo "$ac_err" >&5
9064   echo "configure: failed program was:" >&5
9065   cat conftest.$ac_ext >&5
9066   rm -rf conftest*
9067   eval "ac_cv_header_$ac_safe=no"
9068 fi
9069 rm -f conftest*
9070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9071   echo "$ac_t""yes" 1>&6
9072   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9073 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9074 echo "configure:9075: checking for $athena_variant/ThreeD.h" >&5
9075
9076 cat > conftest.$ac_ext <<EOF
9077 #line 9078 "configure"
9078 #include "confdefs.h"
9079 #include <$athena_variant/ThreeD.h>
9080 EOF
9081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9082 { (eval echo configure:9083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9084 if test -z "$ac_err"; then
9085   rm -rf conftest*
9086   eval "ac_cv_header_$ac_safe=yes"
9087 else
9088   echo "$ac_err" >&5
9089   echo "configure: failed program was:" >&5
9090   cat conftest.$ac_ext >&5
9091   rm -rf conftest*
9092   eval "ac_cv_header_$ac_safe=no"
9093 fi
9094 rm -f conftest*
9095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9096   echo "$ac_t""yes" 1>&6
9097   athena_h_path=$athena_variant
9098 else
9099   echo "$ac_t""no" 1>&6
9100 fi
9101
9102 else
9103   echo "$ac_t""no" 1>&6
9104 fi
9105
9106     fi
9107
9108         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9109       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9110 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9111 echo "configure:9112: checking for X11/Xaw3d/XawInit.h" >&5
9112
9113 cat > conftest.$ac_ext <<EOF
9114 #line 9115 "configure"
9115 #include "confdefs.h"
9116 #include <X11/Xaw3d/XawInit.h>
9117 EOF
9118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9119 { (eval echo configure:9120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9121 if test -z "$ac_err"; then
9122   rm -rf conftest*
9123   eval "ac_cv_header_$ac_safe=yes"
9124 else
9125   echo "$ac_err" >&5
9126   echo "configure: failed program was:" >&5
9127   cat conftest.$ac_ext >&5
9128   rm -rf conftest*
9129   eval "ac_cv_header_$ac_safe=no"
9130 fi
9131 rm -f conftest*
9132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9133   echo "$ac_t""yes" 1>&6
9134   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9135 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9136 echo "configure:9137: checking for X11/Xaw3d/ThreeD.h" >&5
9137
9138 cat > conftest.$ac_ext <<EOF
9139 #line 9140 "configure"
9140 #include "confdefs.h"
9141 #include <X11/Xaw3d/ThreeD.h>
9142 EOF
9143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9144 { (eval echo configure:9145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9146 if test -z "$ac_err"; then
9147   rm -rf conftest*
9148   eval "ac_cv_header_$ac_safe=yes"
9149 else
9150   echo "$ac_err" >&5
9151   echo "configure: failed program was:" >&5
9152   cat conftest.$ac_ext >&5
9153   rm -rf conftest*
9154   eval "ac_cv_header_$ac_safe=no"
9155 fi
9156 rm -f conftest*
9157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9158   echo "$ac_t""yes" 1>&6
9159   
9160             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9161             athena_h_path=X11/Xaw3d
9162           
9163 else
9164   echo "$ac_t""no" 1>&6
9165 fi
9166
9167 else
9168   echo "$ac_t""no" 1>&6
9169 fi
9170
9171     fi
9172
9173         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9174       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9175 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9176 echo "configure:9177: checking for Xaw3d/XawInit.h" >&5
9177
9178 cat > conftest.$ac_ext <<EOF
9179 #line 9180 "configure"
9180 #include "confdefs.h"
9181 #include <Xaw3d/XawInit.h>
9182 EOF
9183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9184 { (eval echo configure:9185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9186 if test -z "$ac_err"; then
9187   rm -rf conftest*
9188   eval "ac_cv_header_$ac_safe=yes"
9189 else
9190   echo "$ac_err" >&5
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=no"
9195 fi
9196 rm -f conftest*
9197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9198   echo "$ac_t""yes" 1>&6
9199   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9200 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9201 echo "configure:9202: checking for Xaw3d/ThreeD.h" >&5
9202
9203 cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 #include <Xaw3d/ThreeD.h>
9207 EOF
9208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9209 { (eval echo configure:9210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9211 if test -z "$ac_err"; then
9212   rm -rf conftest*
9213   eval "ac_cv_header_$ac_safe=yes"
9214 else
9215   echo "$ac_err" >&5
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -rf conftest*
9219   eval "ac_cv_header_$ac_safe=no"
9220 fi
9221 rm -f conftest*
9222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9223   echo "$ac_t""yes" 1>&6
9224   
9225             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9226             athena_h_path=Xaw3d
9227           
9228 else
9229   echo "$ac_t""no" 1>&6
9230 fi
9231
9232 else
9233   echo "$ac_t""no" 1>&6
9234 fi
9235
9236     fi
9237
9238             if test -z "$athena_h_path"; then
9239       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9240 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9241 echo "configure:9242: checking for X11/Xaw/ThreeD.h" >&5
9242
9243 cat > conftest.$ac_ext <<EOF
9244 #line 9245 "configure"
9245 #include "confdefs.h"
9246 #include <X11/Xaw/ThreeD.h>
9247 EOF
9248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9249 { (eval echo configure:9250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9251 if test -z "$ac_err"; then
9252   rm -rf conftest*
9253   eval "ac_cv_header_$ac_safe=yes"
9254 else
9255   echo "$ac_err" >&5
9256   echo "configure: failed program was:" >&5
9257   cat conftest.$ac_ext >&5
9258   rm -rf conftest*
9259   eval "ac_cv_header_$ac_safe=no"
9260 fi
9261 rm -f conftest*
9262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9263   echo "$ac_t""yes" 1>&6
9264   
9265           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9266           athena_h_path=X11/Xaw
9267         
9268 else
9269   echo "$ac_t""no" 1>&6
9270 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9271 fi
9272
9273     fi
9274   fi
9275
9276     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9277     have_xaw=yes
9278   else
9279     have_xaw=no
9280   fi
9281
9282     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9283 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9284 echo "configure:9285: checking for Xm/Xm.h" >&5
9285
9286 cat > conftest.$ac_ext <<EOF
9287 #line 9288 "configure"
9288 #include "confdefs.h"
9289 #include <Xm/Xm.h>
9290 EOF
9291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9292 { (eval echo configure:9293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9294 if test -z "$ac_err"; then
9295   rm -rf conftest*
9296   eval "ac_cv_header_$ac_safe=yes"
9297 else
9298   echo "$ac_err" >&5
9299   echo "configure: failed program was:" >&5
9300   cat conftest.$ac_ext >&5
9301   rm -rf conftest*
9302   eval "ac_cv_header_$ac_safe=no"
9303 fi
9304 rm -f conftest*
9305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9306   echo "$ac_t""yes" 1>&6
9307   
9308 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9309 echo "configure:9310: checking for XmStringFree in -lXm" >&5
9310 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9311
9312 xe_check_libs=" -lXm "
9313 cat > conftest.$ac_ext <<EOF
9314 #line 9315 "configure"
9315 #include "confdefs.h"
9316 /* Override any gcc2 internal prototype to avoid an error.  */
9317 /* We use char because int might match the return type of a gcc2
9318     builtin and then its argument prototype would still apply.  */
9319 char XmStringFree();
9320
9321 int main() {
9322 XmStringFree()
9323 ; return 0; }
9324 EOF
9325 if { (eval echo configure:9326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9326   rm -rf conftest*
9327   eval "ac_cv_lib_$ac_lib_var=yes"
9328 else
9329   echo "configure: failed program was:" >&5
9330   cat conftest.$ac_ext >&5
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=no"
9333 fi
9334 rm -f conftest*
9335 xe_check_libs=""
9336
9337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9338   echo "$ac_t""yes" 1>&6
9339   have_motif=yes
9340 else
9341   echo "$ac_t""no" 1>&6
9342 have_motif=no
9343 fi
9344
9345
9346 else
9347   echo "$ac_t""no" 1>&6
9348 have_motif=no
9349 fi
9350
9351
9352   if test "$have_motif" = "yes"; then
9353         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9354 echo "configure:9355: checking for Lesstif" >&5
9355     cat > conftest.$ac_ext <<EOF
9356 #line 9357 "configure"
9357 #include "confdefs.h"
9358 #include <Xm/Xm.h>
9359 #ifdef LESSTIF_VERSION
9360 yes
9361 #endif
9362
9363 EOF
9364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9365   egrep "yes" >/dev/null 2>&1; then
9366   rm -rf conftest*
9367   have_lesstif=yes
9368 else
9369   rm -rf conftest*
9370   have_lesstif=no
9371 fi
9372 rm -f conftest*
9373
9374   echo "$ac_t""$have_lesstif" 1>&6
9375   fi
9376
9377 fi 
9378
9379 case "$with_menubars" in "" | "yes" | "athena" )
9380   with_menubars="lucid" ;;
9381 esac
9382 case "$with_dialogs" in "" | "yes" | "lucid" )
9383   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9384   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9385   else with_dialogs=no
9386   fi ;;
9387 esac
9388 case "$with_scrollbars" in "" | "yes" )
9389   with_scrollbars="lucid" ;;
9390 esac
9391 case "$with_widgets" in "" | "yes" | "lucid")
9392   if   test "$have_motif" = "yes"; then with_widgets="motif"
9393   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9394   else with_widgets=no
9395   fi ;;
9396 esac
9397
9398 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9399
9400 case "$all_widgets" in
9401   *athena* )
9402     if test "$have_xaw" != "yes"; then
9403       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9404     fi
9405
9406         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9407
9408         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9409
9410                     { test "$extra_verbose" = "yes" && cat << EOF
9411     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9412 EOF
9413 cat >> confdefs.h <<EOF
9414 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9415 EOF
9416 }
9417
9418     { test "$extra_verbose" = "yes" && cat << EOF
9419     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9420 EOF
9421 cat >> confdefs.h <<EOF
9422 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9423 EOF
9424 }
9425
9426     { test "$extra_verbose" = "yes" && cat << EOF
9427     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9428 EOF
9429 cat >> confdefs.h <<EOF
9430 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9431 EOF
9432 }
9433
9434     { test "$extra_verbose" = "yes" && cat << EOF
9435     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9436 EOF
9437 cat >> confdefs.h <<EOF
9438 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9439 EOF
9440 }
9441
9442     { test "$extra_verbose" = "yes" && cat << EOF
9443     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9444 EOF
9445 cat >> confdefs.h <<EOF
9446 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9447 EOF
9448 }
9449
9450     { test "$extra_verbose" = "yes" && cat << EOF
9451     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9452 EOF
9453 cat >> confdefs.h <<EOF
9454 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9455 EOF
9456 }
9457
9458     { test "$extra_verbose" = "yes" && cat << EOF
9459     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9460 EOF
9461 cat >> confdefs.h <<EOF
9462 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9463 EOF
9464 }
9465
9466     { test "$extra_verbose" = "yes" && cat << EOF
9467     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9468 EOF
9469 cat >> confdefs.h <<EOF
9470 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9471 EOF
9472 }
9473
9474     { test "$extra_verbose" = "yes" && cat << EOF
9475     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9476 EOF
9477 cat >> confdefs.h <<EOF
9478 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9479 EOF
9480 }
9481
9482     { test "$extra_verbose" = "yes" && cat << EOF
9483     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9484 EOF
9485 cat >> confdefs.h <<EOF
9486 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9487 EOF
9488 }
9489
9490
9491     { test "$extra_verbose" = "yes" && cat << \EOF
9492     Defining LWLIB_USES_ATHENA
9493 EOF
9494 cat >> confdefs.h <<\EOF
9495 #define LWLIB_USES_ATHENA 1
9496 EOF
9497 }
9498
9499     { test "$extra_verbose" = "yes" && cat << \EOF
9500     Defining NEED_ATHENA
9501 EOF
9502 cat >> confdefs.h <<\EOF
9503 #define NEED_ATHENA 1
9504 EOF
9505 }
9506
9507     need_athena="yes"
9508
9509     if test "$athena_3d" = "yes"; then
9510       { test "$extra_verbose" = "yes" && cat << \EOF
9511     Defining HAVE_ATHENA_3D
9512 EOF
9513 cat >> confdefs.h <<\EOF
9514 #define HAVE_ATHENA_3D 1
9515 EOF
9516 }
9517
9518     fi
9519   ;;
9520 esac
9521
9522 case "$all_widgets" in *motif* )
9523   { test "$extra_verbose" = "yes" && cat << \EOF
9524     Defining LWLIB_USES_MOTIF
9525 EOF
9526 cat >> confdefs.h <<\EOF
9527 #define LWLIB_USES_MOTIF 1
9528 EOF
9529 }
9530
9531   { test "$extra_verbose" = "yes" && cat << \EOF
9532     Defining NEED_MOTIF
9533 EOF
9534 cat >> confdefs.h <<\EOF
9535 #define NEED_MOTIF 1
9536 EOF
9537 }
9538
9539   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9540   need_motif=yes ;;
9541 esac
9542
9543 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9544 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9545 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9546 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9547         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9548 case "$with_widgets" in athena* )
9549         lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;;
9550 esac
9551 case "$all_widgets" in *lucid* )
9552   { test "$extra_verbose" = "yes" && cat << \EOF
9553     Defining NEED_LUCID
9554 EOF
9555 cat >> confdefs.h <<\EOF
9556 #define NEED_LUCID 1
9557 EOF
9558 }
9559
9560   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9561 esac
9562
9563
9564
9565 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9566     Defining LWLIB_SCROLLBARS_ATHENA
9567 EOF
9568 cat >> confdefs.h <<\EOF
9569 #define LWLIB_SCROLLBARS_ATHENA 1
9570 EOF
9571 }
9572
9573 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9574     Defining LWLIB_DIALOGS_ATHENA
9575 EOF
9576 cat >> confdefs.h <<\EOF
9577 #define LWLIB_DIALOGS_ATHENA 1
9578 EOF
9579 }
9580
9581
9582 if test "$athena_3d" = "yes"; then
9583   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9584     Defining LWLIB_SCROLLBARS_ATHENA3D
9585 EOF
9586 cat >> confdefs.h <<\EOF
9587 #define LWLIB_SCROLLBARS_ATHENA3D 1
9588 EOF
9589 }
9590
9591   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9592     Defining LWLIB_DIALOGS_ATHENA3D
9593 EOF
9594 cat >> confdefs.h <<\EOF
9595 #define LWLIB_DIALOGS_ATHENA3D 1
9596 EOF
9597 }
9598
9599 fi
9600
9601 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9602     Defining LWLIB_WIDGETS_ATHENA
9603 EOF
9604 cat >> confdefs.h <<\EOF
9605 #define LWLIB_WIDGETS_ATHENA 1
9606 EOF
9607 }
9608 ;; esac
9609 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9610         { test "$extra_verbose" = "yes" && cat << \EOF
9611     Defining LWLIB_TABS_LUCID
9612 EOF
9613 cat >> confdefs.h <<\EOF
9614 #define LWLIB_TABS_LUCID 1
9615 EOF
9616 }
9617
9618
9619 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining HAVE_MENUBARS
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define HAVE_MENUBARS 1
9624 EOF
9625 }
9626
9627 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9628     Defining HAVE_SCROLLBARS
9629 EOF
9630 cat >> confdefs.h <<\EOF
9631 #define HAVE_SCROLLBARS 1
9632 EOF
9633 }
9634
9635 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9636     Defining HAVE_DIALOGS
9637 EOF
9638 cat >> confdefs.h <<\EOF
9639 #define HAVE_DIALOGS 1
9640 EOF
9641 }
9642
9643 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9644     Defining HAVE_TOOLBARS
9645 EOF
9646 cat >> confdefs.h <<\EOF
9647 #define HAVE_TOOLBARS 1
9648 EOF
9649 }
9650
9651 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9652     Defining HAVE_WIDGETS
9653 EOF
9654 cat >> confdefs.h <<\EOF
9655 #define HAVE_WIDGETS 1
9656 EOF
9657 }
9658
9659
9660 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9661     Defining LWLIB_MENUBARS_LUCID
9662 EOF
9663 cat >> confdefs.h <<\EOF
9664 #define LWLIB_MENUBARS_LUCID 1
9665 EOF
9666 }
9667
9668 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9669     Defining LWLIB_SCROLLBARS_LUCID
9670 EOF
9671 cat >> confdefs.h <<\EOF
9672 #define LWLIB_SCROLLBARS_LUCID 1
9673 EOF
9674 }
9675
9676
9677 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9678     Defining LWLIB_MENUBARS_MOTIF
9679 EOF
9680 cat >> confdefs.h <<\EOF
9681 #define LWLIB_MENUBARS_MOTIF 1
9682 EOF
9683 }
9684
9685 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9686     Defining LWLIB_SCROLLBARS_MOTIF
9687 EOF
9688 cat >> confdefs.h <<\EOF
9689 #define LWLIB_SCROLLBARS_MOTIF 1
9690 EOF
9691 }
9692
9693 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9694     Defining LWLIB_DIALOGS_MOTIF
9695 EOF
9696 cat >> confdefs.h <<\EOF
9697 #define LWLIB_DIALOGS_MOTIF 1
9698 EOF
9699 }
9700
9701 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9702     Defining LWLIB_WIDGETS_MOTIF
9703 EOF
9704 cat >> confdefs.h <<\EOF
9705 #define LWLIB_WIDGETS_MOTIF 1
9706 EOF
9707 }
9708
9709
9710 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9711    echo "    xemacs will be linked with \"menubar.o\""
9712  fi
9713 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9714    echo "    xemacs will be linked with \"scrollbar.o\""
9715  fi
9716 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9717    echo "    xemacs will be linked with \"dialog.o\""
9718  fi
9719 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9720    echo "    xemacs will be linked with \"toolbar.o\""
9721  fi
9722
9723 if test "$with_gtk" = "yes"; then
9724   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9725    echo "    xemacs will be linked with \"menubar-gtk.o\""
9726  fi
9727   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9728    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9729  fi
9730   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9731    echo "    xemacs will be linked with \"dialog-gtk.o\""
9732  fi
9733   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9734    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9735  fi
9736   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9737    echo "    xemacs will be linked with \"gui-gtk.o\""
9738  fi
9739 fi
9740
9741 if test "$with_x11" = "yes"; then
9742   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9743    echo "    xemacs will be linked with \"menubar-x.o\""
9744  fi
9745   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9746    echo "    xemacs will be linked with \"scrollbar-x.o\""
9747  fi
9748   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9749    echo "    xemacs will be linked with \"dialog-x.o\""
9750  fi
9751   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"toolbar-x.o\""
9753  fi
9754   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9755    echo "    xemacs will be linked with \"gui-x.o\""
9756  fi
9757 fi
9758
9759
9760 test -z "$with_mule" && with_mule=no
9761 test -z "$with_file_coding" && with_file_coding=no
9762
9763
9764 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9765   { test "$extra_verbose" = "yes" && cat << \EOF
9766     Defining FILE_CODING
9767 EOF
9768 cat >> confdefs.h <<\EOF
9769 #define FILE_CODING 1
9770 EOF
9771 }
9772
9773   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9774    echo "    xemacs will be linked with \"file-coding.o\""
9775  fi
9776 fi
9777
9778 if test "$with_mule" = "yes" ; then
9779   echo "checking for Mule-related features" 1>&6
9780 echo "configure:9781: checking for Mule-related features" >&5
9781   { test "$extra_verbose" = "yes" && cat << \EOF
9782     Defining MULE
9783 EOF
9784 cat >> confdefs.h <<\EOF
9785 #define MULE 1
9786 EOF
9787 }
9788
9789   { test "$extra_verbose" = "yes" && cat << \EOF
9790     Defining FILE_CODING
9791 EOF
9792 cat >> confdefs.h <<\EOF
9793 #define FILE_CODING 1
9794 EOF
9795 }
9796
9797   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9798    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9799  fi
9800
9801     for ac_hdr in libintl.h
9802 do
9803 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9804 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9805 echo "configure:9806: checking for $ac_hdr" >&5
9806
9807 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <$ac_hdr>
9811 EOF
9812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9813 { (eval echo configure:9814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9815 if test -z "$ac_err"; then
9816   rm -rf conftest*
9817   eval "ac_cv_header_$ac_safe=yes"
9818 else
9819   echo "$ac_err" >&5
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   eval "ac_cv_header_$ac_safe=no"
9824 fi
9825 rm -f conftest*
9826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9827   echo "$ac_t""yes" 1>&6
9828     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9829   { test "$extra_verbose" = "yes" && cat << EOF
9830     Defining $ac_tr_hdr
9831 EOF
9832 cat >> confdefs.h <<EOF
9833 #define $ac_tr_hdr 1
9834 EOF
9835 }
9836  
9837 else
9838   echo "$ac_t""no" 1>&6
9839 fi
9840 done
9841
9842   
9843 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9844 echo "configure:9845: checking for strerror in -lintl" >&5
9845 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9846
9847 xe_check_libs=" -lintl "
9848 cat > conftest.$ac_ext <<EOF
9849 #line 9850 "configure"
9850 #include "confdefs.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 strerror();
9855
9856 int main() {
9857 strerror()
9858 ; return 0; }
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9861   rm -rf conftest*
9862   eval "ac_cv_lib_$ac_lib_var=yes"
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -rf conftest*
9867   eval "ac_cv_lib_$ac_lib_var=no"
9868 fi
9869 rm -f conftest*
9870 xe_check_libs=""
9871
9872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9873   echo "$ac_t""yes" 1>&6
9874     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9875     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9876   { test "$extra_verbose" = "yes" && cat << EOF
9877     Defining $ac_tr_lib
9878 EOF
9879 cat >> confdefs.h <<EOF
9880 #define $ac_tr_lib 1
9881 EOF
9882 }
9883
9884   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9885
9886 else
9887   echo "$ac_t""no" 1>&6
9888 fi
9889
9890
9891
9892   echo "checking for Mule input methods" 1>&6
9893 echo "configure:9894: checking for Mule input methods" >&5
9894         case "$with_xim" in "" | "yes" )
9895     echo "checking for XIM" 1>&6
9896 echo "configure:9897: checking for XIM" >&5
9897     
9898 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9899 echo "configure:9900: checking for XOpenIM in -lX11" >&5
9900 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9901
9902 xe_check_libs=" -lX11 "
9903 cat > conftest.$ac_ext <<EOF
9904 #line 9905 "configure"
9905 #include "confdefs.h"
9906 /* Override any gcc2 internal prototype to avoid an error.  */
9907 /* We use char because int might match the return type of a gcc2
9908     builtin and then its argument prototype would still apply.  */
9909 char XOpenIM();
9910
9911 int main() {
9912 XOpenIM()
9913 ; return 0; }
9914 EOF
9915 if { (eval echo configure:9916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9916   rm -rf conftest*
9917   eval "ac_cv_lib_$ac_lib_var=yes"
9918 else
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   eval "ac_cv_lib_$ac_lib_var=no"
9923 fi
9924 rm -f conftest*
9925 xe_check_libs=""
9926
9927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9928   echo "$ac_t""yes" 1>&6
9929   with_xim=xlib
9930 else
9931   echo "$ac_t""no" 1>&6
9932 with_xim=no
9933 fi
9934
9935
9936         if test "$have_motif $have_lesstif" = "yes no"; then
9937       
9938 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9939 echo "configure:9940: checking for XmImMbLookupString in -lXm" >&5
9940 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9941
9942 xe_check_libs=" -lXm "
9943 cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946 /* Override any gcc2 internal prototype to avoid an error.  */
9947 /* We use char because int might match the return type of a gcc2
9948     builtin and then its argument prototype would still apply.  */
9949 char XmImMbLookupString();
9950
9951 int main() {
9952 XmImMbLookupString()
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9956   rm -rf conftest*
9957   eval "ac_cv_lib_$ac_lib_var=yes"
9958 else
9959   echo "configure: failed program was:" >&5
9960   cat conftest.$ac_ext >&5
9961   rm -rf conftest*
9962   eval "ac_cv_lib_$ac_lib_var=no"
9963 fi
9964 rm -f conftest*
9965 xe_check_libs=""
9966
9967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9968   echo "$ac_t""yes" 1>&6
9969   with_xim=motif
9970 else
9971   echo "$ac_t""no" 1>&6
9972 fi
9973
9974
9975     fi ;;
9976   esac
9977   if test "$with_xim" != "no"; then
9978     { test "$extra_verbose" = "yes" && cat << \EOF
9979     Defining HAVE_XIM
9980 EOF
9981 cat >> confdefs.h <<\EOF
9982 #define HAVE_XIM 1
9983 EOF
9984 }
9985
9986     if test "$with_xim" = "xlib"; then
9987       { test "$extra_verbose" = "yes" && cat << \EOF
9988     Defining XIM_XLIB
9989 EOF
9990 cat >> confdefs.h <<\EOF
9991 #define XIM_XLIB 1
9992 EOF
9993 }
9994
9995       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9996    echo "    xemacs will be linked with \"input-method-xlib.o\""
9997  fi
9998     fi
9999     if test "$with_xim" = "motif"; then
10000       { test "$extra_verbose" = "yes" && cat << \EOF
10001     Defining XIM_MOTIF
10002 EOF
10003 cat >> confdefs.h <<\EOF
10004 #define XIM_MOTIF 1
10005 EOF
10006 }
10007
10008       need_motif=yes
10009       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10010    echo "    xemacs will be linked with \"input-method-motif.o\""
10011  fi
10012     fi
10013     if test "$with_xim" = "motif"; then
10014       with_xfs=no
10015     fi
10016   fi
10017
10018     if test "$with_xfs" = "yes" ; then
10019     echo "checking for XFontSet" 1>&6
10020 echo "configure:10021: checking for XFontSet" >&5
10021     
10022 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10023 echo "configure:10024: checking for XmbDrawString in -lX11" >&5
10024 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10025
10026 xe_check_libs=" -lX11 "
10027 cat > conftest.$ac_ext <<EOF
10028 #line 10029 "configure"
10029 #include "confdefs.h"
10030 /* Override any gcc2 internal prototype to avoid an error.  */
10031 /* We use char because int might match the return type of a gcc2
10032     builtin and then its argument prototype would still apply.  */
10033 char XmbDrawString();
10034
10035 int main() {
10036 XmbDrawString()
10037 ; return 0; }
10038 EOF
10039 if { (eval echo configure:10040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10040   rm -rf conftest*
10041   eval "ac_cv_lib_$ac_lib_var=yes"
10042 else
10043   echo "configure: failed program was:" >&5
10044   cat conftest.$ac_ext >&5
10045   rm -rf conftest*
10046   eval "ac_cv_lib_$ac_lib_var=no"
10047 fi
10048 rm -f conftest*
10049 xe_check_libs=""
10050
10051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10052   echo "$ac_t""yes" 1>&6
10053   :
10054 else
10055   echo "$ac_t""no" 1>&6
10056 with_xfs=no
10057 fi
10058
10059
10060     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10061       { test "$extra_verbose" = "yes" && cat << \EOF
10062     Defining USE_XFONTSET
10063 EOF
10064 cat >> confdefs.h <<\EOF
10065 #define USE_XFONTSET 1
10066 EOF
10067 }
10068
10069       if test "$with_xim" = "no" ; then
10070         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10071    echo "    xemacs will be linked with \"input-method-xlib.o\""
10072  fi
10073       fi
10074     fi
10075   fi 
10076     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10077   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10078 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10079 echo "configure:10080: checking for wnn/jllib.h" >&5
10080
10081 cat > conftest.$ac_ext <<EOF
10082 #line 10083 "configure"
10083 #include "confdefs.h"
10084 #include <wnn/jllib.h>
10085 EOF
10086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10087 { (eval echo configure:10088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10089 if test -z "$ac_err"; then
10090   rm -rf conftest*
10091   eval "ac_cv_header_$ac_safe=yes"
10092 else
10093   echo "$ac_err" >&5
10094   echo "configure: failed program was:" >&5
10095   cat conftest.$ac_ext >&5
10096   rm -rf conftest*
10097   eval "ac_cv_header_$ac_safe=no"
10098 fi
10099 rm -f conftest*
10100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102   :
10103 else
10104   echo "$ac_t""no" 1>&6
10105 with_wnn=no
10106 fi
10107  }
10108     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10109 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10110 echo "configure:10111: checking for wnn/commonhd.h" >&5
10111
10112 cat > conftest.$ac_ext <<EOF
10113 #line 10114 "configure"
10114 #include "confdefs.h"
10115 #include <wnn/commonhd.h>
10116 EOF
10117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10118 { (eval echo configure:10119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10120 if test -z "$ac_err"; then
10121   rm -rf conftest*
10122   eval "ac_cv_header_$ac_safe=yes"
10123 else
10124   echo "$ac_err" >&5
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   eval "ac_cv_header_$ac_safe=no"
10129 fi
10130 rm -f conftest*
10131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10132   echo "$ac_t""yes" 1>&6
10133   :
10134 else
10135   echo "$ac_t""no" 1>&6
10136 with_wnn=no
10137 fi
10138  }
10139     if test "$with_wnn" != "no"; then
10140     for ac_func in crypt
10141 do
10142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10143 echo "configure:10144: checking for $ac_func" >&5
10144
10145 cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 /* System header to define __stub macros and hopefully few prototypes,
10149     which can conflict with char $ac_func(); below.  */
10150 #include <assert.h>
10151 /* Override any gcc2 internal prototype to avoid an error.  */
10152 /* We use char because int might match the return type of a gcc2
10153     builtin and then its argument prototype would still apply.  */
10154 char $ac_func();
10155
10156 int main() {
10157
10158 /* The GNU C library defines this for functions which it implements
10159     to always fail with ENOSYS.  Some functions are actually named
10160     something starting with __ and the normal name is an alias.  */
10161 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10162 choke me
10163 #else
10164 $ac_func();
10165 #endif
10166
10167 ; return 0; }
10168 EOF
10169 if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10170   rm -rf conftest*
10171   eval "ac_cv_func_$ac_func=yes"
10172 else
10173   echo "configure: failed program was:" >&5
10174   cat conftest.$ac_ext >&5
10175   rm -rf conftest*
10176   eval "ac_cv_func_$ac_func=no"
10177 fi
10178 rm -f conftest*
10179
10180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10181   echo "$ac_t""yes" 1>&6
10182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10183   { test "$extra_verbose" = "yes" && cat << EOF
10184     Defining $ac_tr_func
10185 EOF
10186 cat >> confdefs.h <<EOF
10187 #define $ac_tr_func 1
10188 EOF
10189 }
10190  
10191 else
10192   echo "$ac_t""no" 1>&6
10193 fi
10194 done
10195
10196     test "$ac_cv_func_crypt" != "yes" && { 
10197 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10198 echo "configure:10199: checking for crypt in -lcrypt" >&5
10199 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10200
10201 xe_check_libs=" -lcrypt "
10202 cat > conftest.$ac_ext <<EOF
10203 #line 10204 "configure"
10204 #include "confdefs.h"
10205 /* Override any gcc2 internal prototype to avoid an error.  */
10206 /* We use char because int might match the return type of a gcc2
10207     builtin and then its argument prototype would still apply.  */
10208 char crypt();
10209
10210 int main() {
10211 crypt()
10212 ; return 0; }
10213 EOF
10214 if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10215   rm -rf conftest*
10216   eval "ac_cv_lib_$ac_lib_var=yes"
10217 else
10218   echo "configure: failed program was:" >&5
10219   cat conftest.$ac_ext >&5
10220   rm -rf conftest*
10221   eval "ac_cv_lib_$ac_lib_var=no"
10222 fi
10223 rm -f conftest*
10224 xe_check_libs=""
10225
10226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10227   echo "$ac_t""yes" 1>&6
10228     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10230   { test "$extra_verbose" = "yes" && cat << EOF
10231     Defining $ac_tr_lib
10232 EOF
10233 cat >> confdefs.h <<EOF
10234 #define $ac_tr_lib 1
10235 EOF
10236 }
10237
10238   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10239
10240 else
10241   echo "$ac_t""no" 1>&6
10242 fi
10243
10244  }
10245   fi
10246     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10247     
10248 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10249 echo "configure:10250: checking for jl_dic_list_e in -lwnn" >&5
10250 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10251
10252 xe_check_libs=" -lwnn "
10253 cat > conftest.$ac_ext <<EOF
10254 #line 10255 "configure"
10255 #include "confdefs.h"
10256 /* Override any gcc2 internal prototype to avoid an error.  */
10257 /* We use char because int might match the return type of a gcc2
10258     builtin and then its argument prototype would still apply.  */
10259 char jl_dic_list_e();
10260
10261 int main() {
10262 jl_dic_list_e()
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10266   rm -rf conftest*
10267   eval "ac_cv_lib_$ac_lib_var=yes"
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   eval "ac_cv_lib_$ac_lib_var=no"
10273 fi
10274 rm -f conftest*
10275 xe_check_libs=""
10276
10277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10278   echo "$ac_t""yes" 1>&6
10279   libwnn=wnn
10280 else
10281   echo "$ac_t""no" 1>&6
10282 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10283 echo "configure:10284: checking for jl_dic_list_e in -lwnn4" >&5
10284 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10285
10286 xe_check_libs=" -lwnn4 "
10287 cat > conftest.$ac_ext <<EOF
10288 #line 10289 "configure"
10289 #include "confdefs.h"
10290 /* Override any gcc2 internal prototype to avoid an error.  */
10291 /* We use char because int might match the return type of a gcc2
10292     builtin and then its argument prototype would still apply.  */
10293 char jl_dic_list_e();
10294
10295 int main() {
10296 jl_dic_list_e()
10297 ; return 0; }
10298 EOF
10299 if { (eval echo configure:10300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10300   rm -rf conftest*
10301   eval "ac_cv_lib_$ac_lib_var=yes"
10302 else
10303   echo "configure: failed program was:" >&5
10304   cat conftest.$ac_ext >&5
10305   rm -rf conftest*
10306   eval "ac_cv_lib_$ac_lib_var=no"
10307 fi
10308 rm -f conftest*
10309 xe_check_libs=""
10310
10311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10312   echo "$ac_t""yes" 1>&6
10313   libwnn=wnn4
10314 else
10315   echo "$ac_t""no" 1>&6
10316 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10317 echo "configure:10318: checking for jl_dic_list_e in -lwnn6" >&5
10318 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10319
10320 xe_check_libs=" -lwnn6 "
10321 cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324 /* Override any gcc2 internal prototype to avoid an error.  */
10325 /* We use char because int might match the return type of a gcc2
10326     builtin and then its argument prototype would still apply.  */
10327 char jl_dic_list_e();
10328
10329 int main() {
10330 jl_dic_list_e()
10331 ; return 0; }
10332 EOF
10333 if { (eval echo configure:10334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10334   rm -rf conftest*
10335   eval "ac_cv_lib_$ac_lib_var=yes"
10336 else
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   eval "ac_cv_lib_$ac_lib_var=no"
10341 fi
10342 rm -f conftest*
10343 xe_check_libs=""
10344
10345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10346   echo "$ac_t""yes" 1>&6
10347   libwnn=wnn6
10348 else
10349   echo "$ac_t""no" 1>&6
10350 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10351 echo "configure:10352: checking for dic_list_e in -lwnn6_fromsrc" >&5
10352 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10353
10354 xe_check_libs=" -lwnn6_fromsrc "
10355 cat > conftest.$ac_ext <<EOF
10356 #line 10357 "configure"
10357 #include "confdefs.h"
10358 /* Override any gcc2 internal prototype to avoid an error.  */
10359 /* We use char because int might match the return type of a gcc2
10360     builtin and then its argument prototype would still apply.  */
10361 char dic_list_e();
10362
10363 int main() {
10364 dic_list_e()
10365 ; return 0; }
10366 EOF
10367 if { (eval echo configure:10368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10368   rm -rf conftest*
10369   eval "ac_cv_lib_$ac_lib_var=yes"
10370 else
10371   echo "configure: failed program was:" >&5
10372   cat conftest.$ac_ext >&5
10373   rm -rf conftest*
10374   eval "ac_cv_lib_$ac_lib_var=no"
10375 fi
10376 rm -f conftest*
10377 xe_check_libs=""
10378
10379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10380   echo "$ac_t""yes" 1>&6
10381   libwnn=wnn6_fromsrc
10382 else
10383   echo "$ac_t""no" 1>&6
10384 with_wnn=no
10385 fi
10386
10387
10388 fi
10389
10390
10391 fi
10392
10393
10394 fi
10395
10396
10397   fi
10398   test -z "$with_wnn" && with_wnn=yes
10399   if test "$with_wnn" = "yes"; then
10400     { test "$extra_verbose" = "yes" && cat << \EOF
10401     Defining HAVE_WNN
10402 EOF
10403 cat >> confdefs.h <<\EOF
10404 #define HAVE_WNN 1
10405 EOF
10406 }
10407
10408     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10409     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10410    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10411  fi
10412     if test "$with_wnn6" != "no"; then
10413       
10414 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10415 echo "configure:10416: checking for jl_fi_dic_list in -l$libwnn" >&5
10416 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10417
10418 xe_check_libs=" -l$libwnn "
10419 cat > conftest.$ac_ext <<EOF
10420 #line 10421 "configure"
10421 #include "confdefs.h"
10422 /* Override any gcc2 internal prototype to avoid an error.  */
10423 /* We use char because int might match the return type of a gcc2
10424     builtin and then its argument prototype would still apply.  */
10425 char jl_fi_dic_list();
10426
10427 int main() {
10428 jl_fi_dic_list()
10429 ; return 0; }
10430 EOF
10431 if { (eval echo configure:10432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10432   rm -rf conftest*
10433   eval "ac_cv_lib_$ac_lib_var=yes"
10434 else
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_lib_$ac_lib_var=no"
10439 fi
10440 rm -f conftest*
10441 xe_check_libs=""
10442
10443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10444   echo "$ac_t""yes" 1>&6
10445   with_wnn6=yes
10446 else
10447   echo "$ac_t""no" 1>&6
10448 fi
10449
10450
10451       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10452     Defining WNN6
10453 EOF
10454 cat >> confdefs.h <<\EOF
10455 #define WNN6 1
10456 EOF
10457 }
10458
10459     fi
10460   fi
10461
10462     canna_includes_found=no
10463   if test "$with_canna" != "no"; then
10464     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10465 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10466 echo "configure:10467: checking for canna/jrkanji.h" >&5
10467
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <canna/jrkanji.h>
10472 EOF
10473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10474 { (eval echo configure:10475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10476 if test -z "$ac_err"; then
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=yes"
10479 else
10480   echo "$ac_err" >&5
10481   echo "configure: failed program was:" >&5
10482   cat conftest.$ac_ext >&5
10483   rm -rf conftest*
10484   eval "ac_cv_header_$ac_safe=no"
10485 fi
10486 rm -f conftest*
10487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10488   echo "$ac_t""yes" 1>&6
10489   canna_includes_found=yes
10490 else
10491   echo "$ac_t""no" 1>&6
10492 fi
10493
10494   fi
10495   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10496       -d "/usr/local/canna/include"; then
10497     save_c_switch_site="$c_switch_site"
10498     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10499     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10500 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10501 echo "configure:10502: checking for canna/jrkanji.h" >&5
10502
10503 cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506 #include <canna/jrkanji.h>
10507 EOF
10508 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10509 { (eval echo configure:10510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10510 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10511 if test -z "$ac_err"; then
10512   rm -rf conftest*
10513   eval "ac_cv_header_$ac_safe=yes"
10514 else
10515   echo "$ac_err" >&5
10516   echo "configure: failed program was:" >&5
10517   cat conftest.$ac_ext >&5
10518   rm -rf conftest*
10519   eval "ac_cv_header_$ac_safe=no"
10520 fi
10521 rm -f conftest*
10522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10523   echo "$ac_t""yes" 1>&6
10524   canna_includes_found=yes
10525 else
10526   echo "$ac_t""no" 1>&6
10527 fi
10528
10529     if test "$canna_includes_found" != "yes"; then
10530       c_switch_site="$save_c_switch_site"
10531       with_canna="no"
10532     fi
10533   fi
10534
10535   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10536 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10537 echo "configure:10538: checking for canna/RK.h" >&5
10538
10539 cat > conftest.$ac_ext <<EOF
10540 #line 10541 "configure"
10541 #include "confdefs.h"
10542 #include <canna/RK.h>
10543 EOF
10544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10545 { (eval echo configure:10546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10547 if test -z "$ac_err"; then
10548   rm -rf conftest*
10549   eval "ac_cv_header_$ac_safe=yes"
10550 else
10551   echo "$ac_err" >&5
10552   echo "configure: failed program was:" >&5
10553   cat conftest.$ac_ext >&5
10554   rm -rf conftest*
10555   eval "ac_cv_header_$ac_safe=no"
10556 fi
10557 rm -f conftest*
10558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10559   echo "$ac_t""yes" 1>&6
10560   :
10561 else
10562   echo "$ac_t""no" 1>&6
10563 with_canna=no
10564 fi
10565  }
10566   test -z "$with_canna" && { 
10567 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10568 echo "configure:10569: checking for RkBgnBun in -lRKC" >&5
10569 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10570
10571 xe_check_libs=" -lRKC "
10572 cat > conftest.$ac_ext <<EOF
10573 #line 10574 "configure"
10574 #include "confdefs.h"
10575 /* Override any gcc2 internal prototype to avoid an error.  */
10576 /* We use char because int might match the return type of a gcc2
10577     builtin and then its argument prototype would still apply.  */
10578 char RkBgnBun();
10579
10580 int main() {
10581 RkBgnBun()
10582 ; return 0; }
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10585   rm -rf conftest*
10586   eval "ac_cv_lib_$ac_lib_var=yes"
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_lib_$ac_lib_var=no"
10592 fi
10593 rm -f conftest*
10594 xe_check_libs=""
10595
10596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10597   echo "$ac_t""yes" 1>&6
10598   :
10599 else
10600   echo "$ac_t""no" 1>&6
10601 with_canna=no
10602 fi
10603
10604  }
10605   test -z "$with_canna" && { 
10606 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10607 echo "configure:10608: checking for jrKanjiControl in -lcanna" >&5
10608 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10609
10610 xe_check_libs=" -lcanna "
10611 cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 /* Override any gcc2 internal prototype to avoid an error.  */
10615 /* We use char because int might match the return type of a gcc2
10616     builtin and then its argument prototype would still apply.  */
10617 char jrKanjiControl();
10618
10619 int main() {
10620 jrKanjiControl()
10621 ; return 0; }
10622 EOF
10623 if { (eval echo configure:10624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10624   rm -rf conftest*
10625   eval "ac_cv_lib_$ac_lib_var=yes"
10626 else
10627   echo "configure: failed program was:" >&5
10628   cat conftest.$ac_ext >&5
10629   rm -rf conftest*
10630   eval "ac_cv_lib_$ac_lib_var=no"
10631 fi
10632 rm -f conftest*
10633 xe_check_libs=""
10634
10635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10636   echo "$ac_t""yes" 1>&6
10637   :
10638 else
10639   echo "$ac_t""no" 1>&6
10640 with_canna=no
10641 fi
10642
10643  }
10644   test -z "$with_canna" && with_canna=yes
10645   if test "$with_canna" = "yes"; then
10646     { test "$extra_verbose" = "yes" && cat << \EOF
10647     Defining HAVE_CANNA
10648 EOF
10649 cat >> confdefs.h <<\EOF
10650 #define HAVE_CANNA 1
10651 EOF
10652 }
10653
10654     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10655     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10656    echo "    xemacs will be linked with \"mule-canna.o\""
10657  fi
10658   fi
10659
10660 else   for feature in xim canna wnn; do
10661     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10662       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10663     fi
10664     eval "with_${feature}=no"
10665   done
10666 fi 
10667
10668 if test "$need_motif" = "yes" ; then
10669   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10670     
10671 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10672 echo "configure:10673: checking for layout_object_getvalue in -li18n" >&5
10673 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10674
10675 xe_check_libs=" -li18n "
10676 cat > conftest.$ac_ext <<EOF
10677 #line 10678 "configure"
10678 #include "confdefs.h"
10679 /* Override any gcc2 internal prototype to avoid an error.  */
10680 /* We use char because int might match the return type of a gcc2
10681     builtin and then its argument prototype would still apply.  */
10682 char layout_object_getvalue();
10683
10684 int main() {
10685 layout_object_getvalue()
10686 ; return 0; }
10687 EOF
10688 if { (eval echo configure:10689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10689   rm -rf conftest*
10690   eval "ac_cv_lib_$ac_lib_var=yes"
10691 else
10692   echo "configure: failed program was:" >&5
10693   cat conftest.$ac_ext >&5
10694   rm -rf conftest*
10695   eval "ac_cv_lib_$ac_lib_var=no"
10696 fi
10697 rm -f conftest*
10698 xe_check_libs=""
10699
10700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10701   echo "$ac_t""yes" 1>&6
10702   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10703 else
10704   echo "$ac_t""no" 1>&6
10705 fi
10706
10707
10708   
10709 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10710     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10711   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10712   
10713         runpath="" runpath_dirs=""
10714   if test -n "$LD_RUN_PATH"; then
10715     runpath="$LD_RUN_PATH"
10716   elif test "$GCC" = "yes"; then
10717         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10718     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10719     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10720     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10721       case "$arg" in P,* | -L* | -R* )
10722         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10723           {
10724 xe_runpath_dir="$dir"
10725   test "$xe_runpath_dir" != "/lib"     -a \
10726         "$xe_runpath_dir" != "/usr/lib" -a \
10727         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10728   eval "$xe_add_unique_runpath_dir"
10729 }
10730         done ;;
10731       esac
10732     done
10733     ld_switch_run="$ld_switch_run_save"
10734     rm -f conftest*
10735   else
10736         for arg in $ld_switch_site $ld_switch_x_site; do
10737       case "$arg" in -L*) {
10738 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10739   test "$xe_runpath_dir" != "/lib"     -a \
10740         "$xe_runpath_dir" != "/usr/lib" -a \
10741         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10742   eval "$xe_add_unique_runpath_dir"
10743 };; esac
10744     done
10745         if test "$opsys $need_motif" = "sol2 yes"; then
10746       xe_runpath_dir="/opt/SUNWdt/lib";
10747       eval "$xe_add_unique_runpath_dir";
10748     fi
10749   fi 
10750   if test -n "$runpath"; then
10751     ld_switch_run="${dash_r}${runpath}"
10752     
10753 if test "$GCC" = "yes"; then
10754   set x $ld_switch_run; shift; ld_switch_run=""
10755   while test -n "$1"; do
10756     case $1 in
10757       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10758       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10759       -Xlinker* ) ;;
10760       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10761     esac
10762     shift
10763   done
10764 fi
10765     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10766   fi
10767 fi
10768
10769 fi
10770
10771 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo 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 stpcpy strerror tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask
10772 do
10773 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10774 echo "configure:10775: checking for $ac_func" >&5
10775
10776 cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 /* System header to define __stub macros and hopefully few prototypes,
10780     which can conflict with char $ac_func(); below.  */
10781 #include <assert.h>
10782 /* Override any gcc2 internal prototype to avoid an error.  */
10783 /* We use char because int might match the return type of a gcc2
10784     builtin and then its argument prototype would still apply.  */
10785 char $ac_func();
10786
10787 int main() {
10788
10789 /* The GNU C library defines this for functions which it implements
10790     to always fail with ENOSYS.  Some functions are actually named
10791     something starting with __ and the normal name is an alias.  */
10792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10793 choke me
10794 #else
10795 $ac_func();
10796 #endif
10797
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10801   rm -rf conftest*
10802   eval "ac_cv_func_$ac_func=yes"
10803 else
10804   echo "configure: failed program was:" >&5
10805   cat conftest.$ac_ext >&5
10806   rm -rf conftest*
10807   eval "ac_cv_func_$ac_func=no"
10808 fi
10809 rm -f conftest*
10810
10811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10814   { test "$extra_verbose" = "yes" && cat << EOF
10815     Defining $ac_tr_func
10816 EOF
10817 cat >> confdefs.h <<EOF
10818 #define $ac_tr_func 1
10819 EOF
10820 }
10821  
10822 else
10823   echo "$ac_t""no" 1>&6
10824 fi
10825 done
10826
10827
10828
10829 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10830 do
10831 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10832 echo "configure:10833: checking for $ac_func" >&5
10833
10834 cat > conftest.$ac_ext <<EOF
10835 #line 10836 "configure"
10836 #include "confdefs.h"
10837 /* System header to define __stub macros and hopefully few prototypes,
10838     which can conflict with char $ac_func(); below.  */
10839 #include <assert.h>
10840 /* Override any gcc2 internal prototype to avoid an error.  */
10841 /* We use char because int might match the return type of a gcc2
10842     builtin and then its argument prototype would still apply.  */
10843 char $ac_func();
10844
10845 int main() {
10846
10847 /* The GNU C library defines this for functions which it implements
10848     to always fail with ENOSYS.  Some functions are actually named
10849     something starting with __ and the normal name is an alias.  */
10850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10851 choke me
10852 #else
10853 $ac_func();
10854 #endif
10855
10856 ; return 0; }
10857 EOF
10858 if { (eval echo configure:10859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10859   rm -rf conftest*
10860   eval "ac_cv_func_$ac_func=yes"
10861 else
10862   echo "configure: failed program was:" >&5
10863   cat conftest.$ac_ext >&5
10864   rm -rf conftest*
10865   eval "ac_cv_func_$ac_func=no"
10866 fi
10867 rm -f conftest*
10868
10869 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10870   echo "$ac_t""yes" 1>&6
10871     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10872   { test "$extra_verbose" = "yes" && cat << EOF
10873     Defining $ac_tr_func
10874 EOF
10875 cat >> confdefs.h <<EOF
10876 #define $ac_tr_func 1
10877 EOF
10878 }
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885
10886 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10887 echo "configure:10888: checking for openpty" >&5
10888
10889 cat > conftest.$ac_ext <<EOF
10890 #line 10891 "configure"
10891 #include "confdefs.h"
10892 /* System header to define __stub macros and hopefully few prototypes,
10893     which can conflict with char openpty(); below.  */
10894 #include <assert.h>
10895 /* Override any gcc2 internal prototype to avoid an error.  */
10896 /* We use char because int might match the return type of a gcc2
10897     builtin and then its argument prototype would still apply.  */
10898 char openpty();
10899
10900 int main() {
10901
10902 /* The GNU C library defines this for functions which it implements
10903     to always fail with ENOSYS.  Some functions are actually named
10904     something starting with __ and the normal name is an alias.  */
10905 #if defined (__stub_openpty) || defined (__stub___openpty)
10906 choke me
10907 #else
10908 openpty();
10909 #endif
10910
10911 ; return 0; }
10912 EOF
10913 if { (eval echo configure:10914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10914   rm -rf conftest*
10915   eval "ac_cv_func_openpty=yes"
10916 else
10917   echo "configure: failed program was:" >&5
10918   cat conftest.$ac_ext >&5
10919   rm -rf conftest*
10920   eval "ac_cv_func_openpty=no"
10921 fi
10922 rm -f conftest*
10923
10924 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10925   echo "$ac_t""yes" 1>&6
10926   have_openpty=yes
10927 else
10928   echo "$ac_t""no" 1>&6
10929
10930   
10931 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10932 echo "configure:10933: checking for openpty in -lutil" >&5
10933 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10934
10935 xe_check_libs=" -lutil "
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939 /* Override any gcc2 internal prototype to avoid an error.  */
10940 /* We use char because int might match the return type of a gcc2
10941     builtin and then its argument prototype would still apply.  */
10942 char openpty();
10943
10944 int main() {
10945 openpty()
10946 ; return 0; }
10947 EOF
10948 if { (eval echo configure:10949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=yes"
10951 else
10952   echo "configure: failed program was:" >&5
10953   cat conftest.$ac_ext >&5
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=no"
10956 fi
10957 rm -f conftest*
10958 xe_check_libs=""
10959
10960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10961   echo "$ac_t""yes" 1>&6
10962   have_openpty=yes need_libutil=yes
10963 else
10964   echo "$ac_t""no" 1>&6
10965 fi
10966
10967
10968 fi
10969
10970 if test "$have_openpty" = "yes"; then
10971   { test "$extra_verbose" = "yes" && cat << \EOF
10972     Defining HAVE_OPENPTY
10973 EOF
10974 cat >> confdefs.h <<\EOF
10975 #define HAVE_OPENPTY 1
10976 EOF
10977 }
10978
10979   for ac_hdr in pty.h libutil.h util.h
10980 do
10981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10983 echo "configure:10984: checking for $ac_hdr" >&5
10984
10985 cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 #include <$ac_hdr>
10989 EOF
10990 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10991 { (eval echo configure:10992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10992 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10993 if test -z "$ac_err"; then
10994   rm -rf conftest*
10995   eval "ac_cv_header_$ac_safe=yes"
10996 else
10997   echo "$ac_err" >&5
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   eval "ac_cv_header_$ac_safe=no"
11002 fi
11003 rm -f conftest*
11004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11005   echo "$ac_t""yes" 1>&6
11006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11007   { test "$extra_verbose" = "yes" && cat << EOF
11008     Defining $ac_tr_hdr
11009 EOF
11010 cat >> confdefs.h <<EOF
11011 #define $ac_tr_hdr 1
11012 EOF
11013 }
11014  break
11015 else
11016   echo "$ac_t""no" 1>&6
11017 fi
11018 done
11019
11020   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11021 fi
11022
11023 for ac_hdr in stropts.h
11024 do
11025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11027 echo "configure:11028: checking for $ac_hdr" >&5
11028
11029 cat > conftest.$ac_ext <<EOF
11030 #line 11031 "configure"
11031 #include "confdefs.h"
11032 #include <$ac_hdr>
11033 EOF
11034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11035 { (eval echo configure:11036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11037 if test -z "$ac_err"; then
11038   rm -rf conftest*
11039   eval "ac_cv_header_$ac_safe=yes"
11040 else
11041   echo "$ac_err" >&5
11042   echo "configure: failed program was:" >&5
11043   cat conftest.$ac_ext >&5
11044   rm -rf conftest*
11045   eval "ac_cv_header_$ac_safe=no"
11046 fi
11047 rm -f conftest*
11048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11051   { test "$extra_verbose" = "yes" && cat << EOF
11052     Defining $ac_tr_hdr
11053 EOF
11054 cat >> confdefs.h <<EOF
11055 #define $ac_tr_hdr 1
11056 EOF
11057 }
11058  
11059 else
11060   echo "$ac_t""no" 1>&6
11061 fi
11062 done
11063
11064 if test "$ac_cv_header_stropts_h" = "yes"; then
11065   for ac_func in isastream
11066 do
11067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11068 echo "configure:11069: checking for $ac_func" >&5
11069
11070 cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 /* System header to define __stub macros and hopefully few prototypes,
11074     which can conflict with char $ac_func(); below.  */
11075 #include <assert.h>
11076 /* Override any gcc2 internal prototype to avoid an error.  */
11077 /* We use char because int might match the return type of a gcc2
11078     builtin and then its argument prototype would still apply.  */
11079 char $ac_func();
11080
11081 int main() {
11082
11083 /* The GNU C library defines this for functions which it implements
11084     to always fail with ENOSYS.  Some functions are actually named
11085     something starting with __ and the normal name is an alias.  */
11086 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11087 choke me
11088 #else
11089 $ac_func();
11090 #endif
11091
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11095   rm -rf conftest*
11096   eval "ac_cv_func_$ac_func=yes"
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   eval "ac_cv_func_$ac_func=no"
11102 fi
11103 rm -f conftest*
11104
11105 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11106   echo "$ac_t""yes" 1>&6
11107     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11108   { test "$extra_verbose" = "yes" && cat << EOF
11109     Defining $ac_tr_func
11110 EOF
11111 cat >> confdefs.h <<EOF
11112 #define $ac_tr_func 1
11113 EOF
11114 }
11115  
11116 else
11117   echo "$ac_t""no" 1>&6
11118 fi
11119 done
11120
11121   for ac_hdr in strtio.h
11122 do
11123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11125 echo "configure:11126: checking for $ac_hdr" >&5
11126
11127 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <$ac_hdr>
11131 EOF
11132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11133 { (eval echo configure:11134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11135 if test -z "$ac_err"; then
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=yes"
11138 else
11139   echo "$ac_err" >&5
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=no"
11144 fi
11145 rm -f conftest*
11146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11149   { test "$extra_verbose" = "yes" && cat << EOF
11150     Defining $ac_tr_hdr
11151 EOF
11152 cat >> confdefs.h <<EOF
11153 #define $ac_tr_hdr 1
11154 EOF
11155 }
11156  
11157 else
11158   echo "$ac_t""no" 1>&6
11159 fi
11160 done
11161  fi
11162
11163 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11164    echo "    xemacs will be linked with \"realpath.o\""
11165  fi
11166
11167 for ac_func in getloadavg
11168 do
11169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11170 echo "configure:11171: checking for $ac_func" >&5
11171
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 /* System header to define __stub macros and hopefully few prototypes,
11176     which can conflict with char $ac_func(); below.  */
11177 #include <assert.h>
11178 /* Override any gcc2 internal prototype to avoid an error.  */
11179 /* We use char because int might match the return type of a gcc2
11180     builtin and then its argument prototype would still apply.  */
11181 char $ac_func();
11182
11183 int main() {
11184
11185 /* The GNU C library defines this for functions which it implements
11186     to always fail with ENOSYS.  Some functions are actually named
11187     something starting with __ and the normal name is an alias.  */
11188 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11189 choke me
11190 #else
11191 $ac_func();
11192 #endif
11193
11194 ; return 0; }
11195 EOF
11196 if { (eval echo configure:11197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11197   rm -rf conftest*
11198   eval "ac_cv_func_$ac_func=yes"
11199 else
11200   echo "configure: failed program was:" >&5
11201   cat conftest.$ac_ext >&5
11202   rm -rf conftest*
11203   eval "ac_cv_func_$ac_func=no"
11204 fi
11205 rm -f conftest*
11206
11207 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11208   echo "$ac_t""yes" 1>&6
11209     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11210   { test "$extra_verbose" = "yes" && cat << EOF
11211     Defining $ac_tr_func
11212 EOF
11213 cat >> confdefs.h <<EOF
11214 #define $ac_tr_func 1
11215 EOF
11216 }
11217  
11218 else
11219   echo "$ac_t""no" 1>&6
11220 fi
11221 done
11222
11223
11224 if test "$ac_cv_func_getloadavg" = "yes"; then
11225         for ac_hdr in sys/loadavg.h
11226 do
11227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_hdr" >&5
11230
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 #include <$ac_hdr>
11235 EOF
11236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11237 { (eval echo configure:11238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11239 if test -z "$ac_err"; then
11240   rm -rf conftest*
11241   eval "ac_cv_header_$ac_safe=yes"
11242 else
11243   echo "$ac_err" >&5
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_header_$ac_safe=no"
11248 fi
11249 rm -f conftest*
11250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11251   echo "$ac_t""yes" 1>&6
11252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11253   { test "$extra_verbose" = "yes" && cat << EOF
11254     Defining $ac_tr_hdr
11255 EOF
11256 cat >> confdefs.h <<EOF
11257 #define $ac_tr_hdr 1
11258 EOF
11259 }
11260  
11261 else
11262   echo "$ac_t""no" 1>&6
11263 fi
11264 done
11265
11266 else
11267     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11268    echo "    xemacs will be linked with \"getloadavg.o\""
11269  fi
11270
11271     
11272 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11273 echo "configure:11274: checking for kstat_open in -lkstat" >&5
11274 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11275
11276 xe_check_libs=" -lkstat "
11277 cat > conftest.$ac_ext <<EOF
11278 #line 11279 "configure"
11279 #include "confdefs.h"
11280 /* Override any gcc2 internal prototype to avoid an error.  */
11281 /* We use char because int might match the return type of a gcc2
11282     builtin and then its argument prototype would still apply.  */
11283 char kstat_open();
11284
11285 int main() {
11286 kstat_open()
11287 ; return 0; }
11288 EOF
11289 if { (eval echo configure:11290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11290   rm -rf conftest*
11291   eval "ac_cv_lib_$ac_lib_var=yes"
11292 else
11293   echo "configure: failed program was:" >&5
11294   cat conftest.$ac_ext >&5
11295   rm -rf conftest*
11296   eval "ac_cv_lib_$ac_lib_var=no"
11297 fi
11298 rm -f conftest*
11299 xe_check_libs=""
11300
11301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11302   echo "$ac_t""yes" 1>&6
11303     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11305   { test "$extra_verbose" = "yes" && cat << EOF
11306     Defining $ac_tr_lib
11307 EOF
11308 cat >> confdefs.h <<EOF
11309 #define $ac_tr_lib 1
11310 EOF
11311 }
11312
11313   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11314
11315 else
11316   echo "$ac_t""no" 1>&6
11317 fi
11318
11319
11320   for ac_hdr in kstat.h
11321 do
11322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11324 echo "configure:11325: checking for $ac_hdr" >&5
11325
11326 cat > conftest.$ac_ext <<EOF
11327 #line 11328 "configure"
11328 #include "confdefs.h"
11329 #include <$ac_hdr>
11330 EOF
11331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11332 { (eval echo configure:11333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11334 if test -z "$ac_err"; then
11335   rm -rf conftest*
11336   eval "ac_cv_header_$ac_safe=yes"
11337 else
11338   echo "$ac_err" >&5
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -rf conftest*
11342   eval "ac_cv_header_$ac_safe=no"
11343 fi
11344 rm -f conftest*
11345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11346   echo "$ac_t""yes" 1>&6
11347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11348   { test "$extra_verbose" = "yes" && cat << EOF
11349     Defining $ac_tr_hdr
11350 EOF
11351 cat >> confdefs.h <<EOF
11352 #define $ac_tr_hdr 1
11353 EOF
11354 }
11355  
11356 else
11357   echo "$ac_t""no" 1>&6
11358 fi
11359 done
11360
11361
11362     
11363 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11364 echo "configure:11365: checking for kvm_read in -lkvm" >&5
11365 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11366
11367 xe_check_libs=" -lkvm "
11368 cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371 /* Override any gcc2 internal prototype to avoid an error.  */
11372 /* We use char because int might match the return type of a gcc2
11373     builtin and then its argument prototype would still apply.  */
11374 char kvm_read();
11375
11376 int main() {
11377 kvm_read()
11378 ; return 0; }
11379 EOF
11380 if { (eval echo configure:11381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11381   rm -rf conftest*
11382   eval "ac_cv_lib_$ac_lib_var=yes"
11383 else
11384   echo "configure: failed program was:" >&5
11385   cat conftest.$ac_ext >&5
11386   rm -rf conftest*
11387   eval "ac_cv_lib_$ac_lib_var=no"
11388 fi
11389 rm -f conftest*
11390 xe_check_libs=""
11391
11392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11393   echo "$ac_t""yes" 1>&6
11394     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11395     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11396   { test "$extra_verbose" = "yes" && cat << EOF
11397     Defining $ac_tr_lib
11398 EOF
11399 cat >> confdefs.h <<EOF
11400 #define $ac_tr_lib 1
11401 EOF
11402 }
11403
11404   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11405
11406 else
11407   echo "$ac_t""no" 1>&6
11408 fi
11409
11410
11411 fi
11412
11413 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11414 echo "configure:11415: checking whether netdb declares h_errno" >&5
11415 cat > conftest.$ac_ext <<EOF
11416 #line 11417 "configure"
11417 #include "confdefs.h"
11418 #include <netdb.h>
11419 int main() {
11420 return h_errno;
11421 ; return 0; }
11422 EOF
11423 if { (eval echo configure:11424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11424   rm -rf conftest*
11425   echo "$ac_t""yes" 1>&6
11426    { test "$extra_verbose" = "yes" && cat << \EOF
11427     Defining HAVE_H_ERRNO
11428 EOF
11429 cat >> confdefs.h <<\EOF
11430 #define HAVE_H_ERRNO 1
11431 EOF
11432 }
11433
11434 else
11435   echo "configure: failed program was:" >&5
11436   cat conftest.$ac_ext >&5
11437   rm -rf conftest*
11438   echo "$ac_t""no" 1>&6
11439 fi
11440 rm -f conftest*
11441
11442 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11443 echo "configure:11444: checking for sigsetjmp" >&5
11444 cat > conftest.$ac_ext <<EOF
11445 #line 11446 "configure"
11446 #include "confdefs.h"
11447 #include <setjmp.h>
11448 int main() {
11449 sigjmp_buf bar; sigsetjmp (bar, 0);
11450 ; return 0; }
11451 EOF
11452 if { (eval echo configure:11453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11453   rm -rf conftest*
11454   echo "$ac_t""yes" 1>&6
11455    { test "$extra_verbose" = "yes" && cat << \EOF
11456     Defining HAVE_SIGSETJMP
11457 EOF
11458 cat >> confdefs.h <<\EOF
11459 #define HAVE_SIGSETJMP 1
11460 EOF
11461 }
11462
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   echo "$ac_t""no" 1>&6
11468 fi
11469 rm -f conftest*
11470
11471 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11472 echo "configure:11473: checking whether localtime caches TZ" >&5
11473
11474 if test "$ac_cv_func_tzset" = "yes"; then
11475 cat > conftest.$ac_ext <<EOF
11476 #line 11477 "configure"
11477 #include "confdefs.h"
11478 #include <time.h>
11479 #if STDC_HEADERS
11480 # include <stdlib.h>
11481 #endif
11482 extern char **environ;
11483 unset_TZ ()
11484 {
11485   char **from, **to;
11486   for (to = from = environ; (*to = *from); from++)
11487     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11488       to++;
11489 }
11490 char TZ_GMT0[] = "TZ=GMT0";
11491 char TZ_PST8[] = "TZ=PST8";
11492 main()
11493 {
11494   time_t now = time ((time_t *) 0);
11495   int hour_GMT0, hour_unset;
11496   if (putenv (TZ_GMT0) != 0)
11497     exit (1);
11498   hour_GMT0 = localtime (&now)->tm_hour;
11499   unset_TZ ();
11500   hour_unset = localtime (&now)->tm_hour;
11501   if (putenv (TZ_PST8) != 0)
11502     exit (1);
11503   if (localtime (&now)->tm_hour == hour_GMT0)
11504     exit (1);
11505   unset_TZ ();
11506   if (localtime (&now)->tm_hour != hour_unset)
11507     exit (1);
11508   exit (0);
11509 }
11510 EOF
11511 if { (eval echo configure:11512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11512 then
11513   emacs_cv_localtime_cache=no
11514 else
11515   conftest_rc="$?"
11516   echo "configure: failed program was:" >&5
11517   cat conftest.$ac_ext >&5
11518   rm -fr conftest*
11519   emacs_cv_localtime_cache=yes
11520 fi
11521 rm -fr conftest*
11522 else
11523         # If we lack tzset, report that localtime does not cache TZ,
11524         # since we can't invalidate the cache if we don't have tzset.
11525         emacs_cv_localtime_cache=no
11526 fi
11527 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11528 if test $emacs_cv_localtime_cache = yes; then
11529   { test "$extra_verbose" = "yes" && cat << \EOF
11530     Defining LOCALTIME_CACHE
11531 EOF
11532 cat >> confdefs.h <<\EOF
11533 #define LOCALTIME_CACHE 1
11534 EOF
11535 }
11536
11537 fi
11538
11539 if test "$HAVE_TIMEVAL" = "yes"; then
11540 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11541 echo "configure:11542: checking whether gettimeofday accepts one or two arguments" >&5
11542 cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545
11546 #ifdef TIME_WITH_SYS_TIME
11547 #include <sys/time.h>
11548 #include <time.h>
11549 #else
11550 #ifdef HAVE_SYS_TIME_H
11551 #include <sys/time.h>
11552 #else
11553 #include <time.h>
11554 #endif
11555 #endif
11556   
11557 int main() {
11558
11559   struct timeval time;
11560   gettimeofday (&time, 0);
11561
11562 ; return 0; }
11563 EOF
11564 if { (eval echo configure:11565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11565   rm -rf conftest*
11566   echo "$ac_t""two" 1>&6
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   echo "$ac_t""one" 1>&6
11572    { test "$extra_verbose" = "yes" && cat << \EOF
11573     Defining GETTIMEOFDAY_ONE_ARGUMENT
11574 EOF
11575 cat >> confdefs.h <<\EOF
11576 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11577 EOF
11578 }
11579
11580 fi
11581 rm -f conftest*
11582 fi
11583
11584
11585 echo $ac_n "checking for inline""... $ac_c" 1>&6
11586 echo "configure:11587: checking for inline" >&5
11587
11588 ac_cv_c_inline=no
11589 for ac_kw in inline __inline__ __inline; do
11590   cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593
11594 int main() {
11595 } $ac_kw foo() {
11596 ; return 0; }
11597 EOF
11598 if { (eval echo configure:11599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11599   rm -rf conftest*
11600   ac_cv_c_inline=$ac_kw; break
11601 else
11602   echo "configure: failed program was:" >&5
11603   cat conftest.$ac_ext >&5
11604 fi
11605 rm -f conftest*
11606 done
11607
11608
11609 echo "$ac_t""$ac_cv_c_inline" 1>&6
11610 case "$ac_cv_c_inline" in
11611   inline | yes) ;;
11612   no) { test "$extra_verbose" = "yes" && cat << \EOF
11613     Defining inline = 
11614 EOF
11615 cat >> confdefs.h <<\EOF
11616 #define inline 
11617 EOF
11618 }
11619  ;;
11620   *)  { test "$extra_verbose" = "yes" && cat << EOF
11621     Defining inline = $ac_cv_c_inline
11622 EOF
11623 cat >> confdefs.h <<EOF
11624 #define inline $ac_cv_c_inline
11625 EOF
11626 }
11627  ;;
11628 esac
11629
11630 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11631    echo "    xemacs will be linked with \"inline.o\""
11632  fi
11633
11634
11635 if test "$__DECC" != "yes"; then
11636   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11637 # for constant arguments.  Useless!
11638 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11639 echo "configure:11640: checking for working alloca.h" >&5
11640
11641 cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644 #include <alloca.h>
11645 int main() {
11646 char *p = alloca(2 * sizeof(int));
11647 ; return 0; }
11648 EOF
11649 if { (eval echo configure:11650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11650   rm -rf conftest*
11651   ac_cv_header_alloca_h=yes
11652 else
11653   echo "configure: failed program was:" >&5
11654   cat conftest.$ac_ext >&5
11655   rm -rf conftest*
11656   ac_cv_header_alloca_h=no
11657 fi
11658 rm -f conftest*
11659
11660 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11661 if test $ac_cv_header_alloca_h = yes; then
11662   { test "$extra_verbose" = "yes" && cat << \EOF
11663     Defining HAVE_ALLOCA_H
11664 EOF
11665 cat >> confdefs.h <<\EOF
11666 #define HAVE_ALLOCA_H 1
11667 EOF
11668 }
11669
11670 fi
11671
11672 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11673 echo "configure:11674: checking for alloca" >&5
11674
11675 cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678
11679 #ifdef __GNUC__
11680 # define alloca __builtin_alloca
11681 #else
11682 # ifdef _MSC_VER
11683 #  include <malloc.h>
11684 #  define alloca _alloca
11685 # else
11686 #  if HAVE_ALLOCA_H
11687 #   include <alloca.h>
11688 #  else
11689 #   ifdef _AIX
11690  #pragma alloca
11691 #   else
11692 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11693 char *alloca ();
11694 #    endif
11695 #   endif
11696 #  endif
11697 # endif
11698 #endif
11699
11700 int main() {
11701 char *p = (char *) alloca(1);
11702 ; return 0; }
11703 EOF
11704 if { (eval echo configure:11705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11705   rm -rf conftest*
11706   ac_cv_func_alloca_works=yes
11707 else
11708   echo "configure: failed program was:" >&5
11709   cat conftest.$ac_ext >&5
11710   rm -rf conftest*
11711   ac_cv_func_alloca_works=no
11712 fi
11713 rm -f conftest*
11714
11715 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11716 if test $ac_cv_func_alloca_works = yes; then
11717   { test "$extra_verbose" = "yes" && cat << \EOF
11718     Defining HAVE_ALLOCA
11719 EOF
11720 cat >> confdefs.h <<\EOF
11721 #define HAVE_ALLOCA 1
11722 EOF
11723 }
11724
11725 fi
11726
11727 if test $ac_cv_func_alloca_works = no; then
11728   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11729   # that cause trouble.  Some versions do not even contain alloca or
11730   # contain a buggy version.  If you still want to use their alloca,
11731   # use ar to extract alloca.o from them instead of compiling alloca.c.
11732   ALLOCA=alloca.${ac_objext}
11733   { test "$extra_verbose" = "yes" && cat << \EOF
11734     Defining C_ALLOCA
11735 EOF
11736 cat >> confdefs.h <<\EOF
11737 #define C_ALLOCA 1
11738 EOF
11739 }
11740
11741
11742 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11743 echo "configure:11744: checking whether alloca needs Cray hooks" >&5
11744
11745 cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 #if defined(CRAY) && ! defined(CRAY2)
11749 webecray
11750 #else
11751 wenotbecray
11752 #endif
11753
11754 EOF
11755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11756   egrep "webecray" >/dev/null 2>&1; then
11757   rm -rf conftest*
11758   ac_cv_os_cray=yes
11759 else
11760   rm -rf conftest*
11761   ac_cv_os_cray=no
11762 fi
11763 rm -f conftest*
11764
11765
11766 echo "$ac_t""$ac_cv_os_cray" 1>&6
11767 if test $ac_cv_os_cray = yes; then
11768 for ac_func in _getb67 GETB67 getb67; do
11769   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11770 echo "configure:11771: checking for $ac_func" >&5
11771
11772 cat > conftest.$ac_ext <<EOF
11773 #line 11774 "configure"
11774 #include "confdefs.h"
11775 /* System header to define __stub macros and hopefully few prototypes,
11776     which can conflict with char $ac_func(); below.  */
11777 #include <assert.h>
11778 /* Override any gcc2 internal prototype to avoid an error.  */
11779 /* We use char because int might match the return type of a gcc2
11780     builtin and then its argument prototype would still apply.  */
11781 char $ac_func();
11782
11783 int main() {
11784
11785 /* The GNU C library defines this for functions which it implements
11786     to always fail with ENOSYS.  Some functions are actually named
11787     something starting with __ and the normal name is an alias.  */
11788 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11789 choke me
11790 #else
11791 $ac_func();
11792 #endif
11793
11794 ; return 0; }
11795 EOF
11796 if { (eval echo configure:11797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11797   rm -rf conftest*
11798   eval "ac_cv_func_$ac_func=yes"
11799 else
11800   echo "configure: failed program was:" >&5
11801   cat conftest.$ac_ext >&5
11802   rm -rf conftest*
11803   eval "ac_cv_func_$ac_func=no"
11804 fi
11805 rm -f conftest*
11806
11807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11808   echo "$ac_t""yes" 1>&6
11809   { test "$extra_verbose" = "yes" && cat << EOF
11810     Defining CRAY_STACKSEG_END = $ac_func
11811 EOF
11812 cat >> confdefs.h <<EOF
11813 #define CRAY_STACKSEG_END $ac_func
11814 EOF
11815 }
11816
11817   break
11818 else
11819   echo "$ac_t""no" 1>&6
11820 fi
11821
11822 done
11823 fi
11824
11825 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11826 echo "configure:11827: checking stack direction for C alloca" >&5
11827
11828 cat > conftest.$ac_ext <<EOF
11829 #line 11830 "configure"
11830 #include "confdefs.h"
11831 find_stack_direction ()
11832 {
11833   static char *addr = 0;
11834   auto char dummy;
11835   if (addr == 0)
11836     {
11837       addr = &dummy;
11838       return find_stack_direction ();
11839     }
11840   else
11841     return (&dummy > addr) ? 1 : -1;
11842 }
11843 main ()
11844 {
11845   exit (find_stack_direction() < 0);
11846 }
11847 EOF
11848 if { (eval echo configure:11849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11849 then
11850   ac_cv_c_stack_direction=1
11851 else
11852   conftest_rc="$?"
11853   echo "configure: failed program was:" >&5
11854   cat conftest.$ac_ext >&5
11855   rm -fr conftest*
11856   ac_cv_c_stack_direction=-1
11857 fi
11858 rm -fr conftest*
11859
11860 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11861 { test "$extra_verbose" = "yes" && cat << EOF
11862     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11863 EOF
11864 cat >> confdefs.h <<EOF
11865 #define STACK_DIRECTION $ac_cv_c_stack_direction
11866 EOF
11867 }
11868
11869 fi
11870
11871   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11872    echo "    xemacs will be linked with \"$ALLOCA\""
11873  fi
11874 fi
11875
11876 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11877 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11878 echo "configure:11879: checking for vfork.h" >&5
11879
11880 cat > conftest.$ac_ext <<EOF
11881 #line 11882 "configure"
11882 #include "confdefs.h"
11883 #include <vfork.h>
11884 EOF
11885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11886 { (eval echo configure:11887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11888 if test -z "$ac_err"; then
11889   rm -rf conftest*
11890   eval "ac_cv_header_$ac_safe=yes"
11891 else
11892   echo "$ac_err" >&5
11893   echo "configure: failed program was:" >&5
11894   cat conftest.$ac_ext >&5
11895   rm -rf conftest*
11896   eval "ac_cv_header_$ac_safe=no"
11897 fi
11898 rm -f conftest*
11899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11900   echo "$ac_t""yes" 1>&6
11901   { test "$extra_verbose" = "yes" && cat << \EOF
11902     Defining HAVE_VFORK_H
11903 EOF
11904 cat >> confdefs.h <<\EOF
11905 #define HAVE_VFORK_H 1
11906 EOF
11907 }
11908
11909 else
11910   echo "$ac_t""no" 1>&6
11911 fi
11912
11913 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11914 echo "configure:11915: checking for working vfork" >&5
11915
11916 cat > conftest.$ac_ext <<EOF
11917 #line 11918 "configure"
11918 #include "confdefs.h"
11919 /* Thanks to Paul Eggert for this test.  */
11920 #include <stdio.h>
11921 #include <sys/types.h>
11922 #include <sys/stat.h>
11923 #ifdef HAVE_UNISTD_H
11924 #include <unistd.h>
11925 #endif
11926 #ifdef HAVE_VFORK_H
11927 #include <vfork.h>
11928 #endif
11929 /* On some sparc systems, changes by the child to local and incoming
11930    argument registers are propagated back to the parent.
11931    The compiler is told about this with #include <vfork.h>,
11932    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11933    Test for this by using a static variable whose address
11934    is put into a register that is clobbered by the vfork.  */
11935 static
11936 #ifdef __cplusplus
11937 sparc_address_test (int arg)
11938 #else
11939 sparc_address_test (arg) int arg;
11940 #endif
11941 {
11942   static pid_t child;
11943   if (!child) {
11944     child = vfork ();
11945     if (child < 0) {
11946       perror ("vfork");
11947       _exit(2);
11948     }
11949     if (!child) {
11950       arg = getpid();
11951       write(-1, "", 0);
11952       _exit (arg);
11953     }
11954   }
11955 }
11956 main() {
11957   pid_t parent = getpid ();
11958   pid_t child;
11959
11960   sparc_address_test ();
11961
11962   child = vfork ();
11963
11964   if (child == 0) {
11965     /* Here is another test for sparc vfork register problems.
11966        This test uses lots of local variables, at least
11967        as many local variables as main has allocated so far
11968        including compiler temporaries.  4 locals are enough for
11969        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11970        A buggy compiler should reuse the register of parent
11971        for one of the local variables, since it will think that
11972        parent can't possibly be used any more in this routine.
11973        Assigning to the local variable will thus munge parent
11974        in the parent process.  */
11975     pid_t
11976       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11977       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11978     /* Convince the compiler that p..p7 are live; otherwise, it might
11979        use the same hardware register for all 8 local variables.  */
11980     if (p != p1 || p != p2 || p != p3 || p != p4
11981         || p != p5 || p != p6 || p != p7)
11982       _exit(1);
11983
11984     /* On some systems (e.g. IRIX 3.3),
11985        vfork doesn't separate parent from child file descriptors.
11986        If the child closes a descriptor before it execs or exits,
11987        this munges the parent's descriptor as well.
11988        Test for this by closing stdout in the child.  */
11989     _exit(close(fileno(stdout)) != 0);
11990   } else {
11991     int status;
11992     struct stat st;
11993
11994     while (wait(&status) != child)
11995       ;
11996     exit(
11997          /* Was there some problem with vforking?  */
11998          child < 0
11999
12000          /* Did the child fail?  (This shouldn't happen.)  */
12001          || status
12002
12003          /* Did the vfork/compiler bug occur?  */
12004          || parent != getpid()
12005
12006          /* Did the file descriptor bug occur?  */
12007          || fstat(fileno(stdout), &st) != 0
12008          );
12009   }
12010 }
12011 EOF
12012 if { (eval echo configure:12013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12013 then
12014   ac_cv_func_vfork_works=yes
12015 else
12016   conftest_rc="$?"
12017   echo "configure: failed program was:" >&5
12018   cat conftest.$ac_ext >&5
12019   rm -fr conftest*
12020   ac_cv_func_vfork_works=no
12021 fi
12022 rm -fr conftest*
12023
12024 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12025 if test $ac_cv_func_vfork_works = no; then
12026   { test "$extra_verbose" = "yes" && cat << \EOF
12027     Defining vfork = fork
12028 EOF
12029 cat >> confdefs.h <<\EOF
12030 #define vfork fork
12031 EOF
12032 }
12033
12034 fi
12035
12036
12037 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12038 echo "configure:12039: checking for working strcoll" >&5
12039
12040 cat > conftest.$ac_ext <<EOF
12041 #line 12042 "configure"
12042 #include "confdefs.h"
12043 #include <string.h>
12044 main ()
12045 {
12046   exit (strcoll ("abc", "def") >= 0 ||
12047         strcoll ("ABC", "DEF") >= 0 ||
12048         strcoll ("123", "456") >= 0);
12049 }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12052 then
12053   ac_cv_func_strcoll_works=yes
12054 else
12055   conftest_rc="$?"
12056   echo "configure: failed program was:" >&5
12057   cat conftest.$ac_ext >&5
12058   rm -fr conftest*
12059   ac_cv_func_strcoll_works=no
12060 fi
12061 rm -fr conftest*
12062
12063 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12064 if test $ac_cv_func_strcoll_works = yes; then
12065   { test "$extra_verbose" = "yes" && cat << \EOF
12066     Defining HAVE_STRCOLL
12067 EOF
12068 cat >> confdefs.h <<\EOF
12069 #define HAVE_STRCOLL 1
12070 EOF
12071 }
12072
12073 fi
12074
12075
12076 for ac_func in getpgrp
12077 do
12078 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12079 echo "configure:12080: checking for $ac_func" >&5
12080
12081 cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* System header to define __stub macros and hopefully few prototypes,
12085     which can conflict with char $ac_func(); below.  */
12086 #include <assert.h>
12087 /* Override any gcc2 internal prototype to avoid an error.  */
12088 /* We use char because int might match the return type of a gcc2
12089     builtin and then its argument prototype would still apply.  */
12090 char $ac_func();
12091
12092 int main() {
12093
12094 /* The GNU C library defines this for functions which it implements
12095     to always fail with ENOSYS.  Some functions are actually named
12096     something starting with __ and the normal name is an alias.  */
12097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12098 choke me
12099 #else
12100 $ac_func();
12101 #endif
12102
12103 ; return 0; }
12104 EOF
12105 if { (eval echo configure:12106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12106   rm -rf conftest*
12107   eval "ac_cv_func_$ac_func=yes"
12108 else
12109   echo "configure: failed program was:" >&5
12110   cat conftest.$ac_ext >&5
12111   rm -rf conftest*
12112   eval "ac_cv_func_$ac_func=no"
12113 fi
12114 rm -f conftest*
12115
12116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12117   echo "$ac_t""yes" 1>&6
12118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12119   { test "$extra_verbose" = "yes" && cat << EOF
12120     Defining $ac_tr_func
12121 EOF
12122 cat >> confdefs.h <<EOF
12123 #define $ac_tr_func 1
12124 EOF
12125 }
12126  
12127 else
12128   echo "$ac_t""no" 1>&6
12129 fi
12130 done
12131
12132 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12133 echo "configure:12134: checking whether getpgrp takes no argument" >&5
12134
12135 cat > conftest.$ac_ext <<EOF
12136 #line 12137 "configure"
12137 #include "confdefs.h"
12138
12139 /*
12140  * If this system has a BSD-style getpgrp(),
12141  * which takes a pid argument, exit unsuccessfully.
12142  *
12143  * Snarfed from Chet Ramey's bash pgrp.c test program
12144  */
12145 #include <stdio.h>
12146 #include <sys/types.h>
12147
12148 int     pid;
12149 int     pg1, pg2, pg3, pg4;
12150 int     ng, np, s, child;
12151
12152 main()
12153 {
12154         pid = getpid();
12155         pg1 = getpgrp(0);
12156         pg2 = getpgrp();
12157         pg3 = getpgrp(pid);
12158         pg4 = getpgrp(1);
12159
12160         /*
12161          * If all of these values are the same, it's pretty sure that
12162          * we're on a system that ignores getpgrp's first argument.
12163          */
12164         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12165                 exit(0);
12166
12167         child = fork();
12168         if (child < 0)
12169                 exit(1);
12170         else if (child == 0) {
12171                 np = getpid();
12172                 /*
12173                  * If this is Sys V, this will not work; pgrp will be
12174                  * set to np because setpgrp just changes a pgrp to be
12175                  * the same as the pid.
12176                  */
12177                 setpgrp(np, pg1);
12178                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12179                 if (ng == pg1) {
12180                         exit(1);
12181                 } else {
12182                         exit(0);
12183                 }
12184         } else {
12185                 wait(&s);
12186                 exit(s>>8);
12187         }
12188 }
12189
12190 EOF
12191 if { (eval echo configure:12192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12192 then
12193   ac_cv_func_getpgrp_void=yes
12194 else
12195   conftest_rc="$?"
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -fr conftest*
12199   ac_cv_func_getpgrp_void=no
12200 fi
12201 rm -fr conftest*
12202
12203
12204 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12205 if test $ac_cv_func_getpgrp_void = yes; then
12206   { test "$extra_verbose" = "yes" && cat << \EOF
12207     Defining GETPGRP_VOID
12208 EOF
12209 cat >> confdefs.h <<\EOF
12210 #define GETPGRP_VOID 1
12211 EOF
12212 }
12213
12214 fi
12215
12216
12217 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12218 echo "configure:12219: checking for working mmap" >&5
12219 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12220 cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 #include <stdio.h>
12224 #include <unistd.h>
12225 #include <fcntl.h>
12226 #include <sys/mman.h>
12227
12228 #ifndef MAP_VARIABLE
12229 #define MAP_VARIABLE 0
12230 #endif
12231
12232 #ifndef MAP_FAILED
12233 #define MAP_FAILED -1
12234 #endif
12235
12236 int main (int argc, char *argv[])
12237 {
12238   int fd = -1;
12239   caddr_t p;
12240 #ifndef MAP_ANONYMOUS
12241   fd = open ("/dev/zero", O_RDWR);
12242   if (fd < 0)
12243     return 1;
12244 #define MAP_ANONYMOUS 0
12245 #endif
12246   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12247            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12248            fd, 0) != (void *) MAP_FAILED)
12249     return 0;
12250   perror ("conftest: mmap failed");
12251   return 1;
12252 }
12253 EOF
12254 if { (eval echo configure:12255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12255 then
12256   have_mmap=yes
12257 else
12258   conftest_rc="$?"
12259   echo "configure: failed program was:" >&5
12260   cat conftest.$ac_ext >&5
12261   rm -fr conftest*
12262   have_mmap=no
12263 fi
12264 rm -fr conftest* ;;
12265 esac
12266 echo "$ac_t""$have_mmap" 1>&6
12267 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12268     Defining HAVE_MMAP
12269 EOF
12270 cat >> confdefs.h <<\EOF
12271 #define HAVE_MMAP 1
12272 EOF
12273 }
12274
12275
12276 case "$opsys" in cygwin*) 
12277         test "$rel_alloc" = "default" && rel_alloc=no ;;
12278 esac
12279 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12280 if test "$rel_alloc $have_mmap" = "default yes"; then
12281   if test "$doug_lea_malloc" = "yes"; then
12282         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12283 echo "configure:12284: checking for M_MMAP_THRESHOLD" >&5
12284     cat > conftest.$ac_ext <<EOF
12285 #line 12286 "configure"
12286 #include "confdefs.h"
12287 #include <malloc.h>
12288 int main() {
12289
12290 #ifndef M_MMAP_THRESHOLD
12291 #error No M_MMAP_THRESHOLD :-(
12292 !@+$%^&*_)(_ - unlikely to compile...
12293 #endif
12294
12295 ; return 0; }
12296 EOF
12297 if { (eval echo configure:12298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12298   rm -rf conftest*
12299   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12300 else
12301   echo "configure: failed program was:" >&5
12302   cat conftest.$ac_ext >&5
12303   rm -rf conftest*
12304   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12305 fi
12306 rm -f conftest*
12307   else
12308     rel_alloc=yes
12309   fi
12310 fi
12311 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12312     Defining REL_ALLOC
12313 EOF
12314 cat >> confdefs.h <<\EOF
12315 #define REL_ALLOC 1
12316 EOF
12317 }
12318
12319
12320 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12321 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12322 echo "configure:12323: checking for termios.h" >&5
12323
12324 cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327 #include <termios.h>
12328 EOF
12329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12330 { (eval echo configure:12331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12332 if test -z "$ac_err"; then
12333   rm -rf conftest*
12334   eval "ac_cv_header_$ac_safe=yes"
12335 else
12336   echo "$ac_err" >&5
12337   echo "configure: failed program was:" >&5
12338   cat conftest.$ac_ext >&5
12339   rm -rf conftest*
12340   eval "ac_cv_header_$ac_safe=no"
12341 fi
12342 rm -f conftest*
12343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12344   echo "$ac_t""yes" 1>&6
12345   { test "$extra_verbose" = "yes" && cat << \EOF
12346     Defining HAVE_TERMIOS
12347 EOF
12348 cat >> confdefs.h <<\EOF
12349 #define HAVE_TERMIOS 1
12350 EOF
12351 }
12352
12353   { test "$extra_verbose" = "yes" && cat << \EOF
12354     Defining SIGNALS_VIA_CHARACTERS
12355 EOF
12356 cat >> confdefs.h <<\EOF
12357 #define SIGNALS_VIA_CHARACTERS 1
12358 EOF
12359 }
12360
12361   { test "$extra_verbose" = "yes" && cat << \EOF
12362     Defining NO_TERMIO
12363 EOF
12364 cat >> confdefs.h <<\EOF
12365 #define NO_TERMIO 1
12366 EOF
12367 }
12368
12369 else
12370   echo "$ac_t""no" 1>&6
12371 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12372 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12373 echo "configure:12374: checking for termio.h" >&5
12374
12375 cat > conftest.$ac_ext <<EOF
12376 #line 12377 "configure"
12377 #include "confdefs.h"
12378 #include <termio.h>
12379 EOF
12380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12381 { (eval echo configure:12382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12383 if test -z "$ac_err"; then
12384   rm -rf conftest*
12385   eval "ac_cv_header_$ac_safe=yes"
12386 else
12387   echo "$ac_err" >&5
12388   echo "configure: failed program was:" >&5
12389   cat conftest.$ac_ext >&5
12390   rm -rf conftest*
12391   eval "ac_cv_header_$ac_safe=no"
12392 fi
12393 rm -f conftest*
12394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12395   echo "$ac_t""yes" 1>&6
12396   { test "$extra_verbose" = "yes" && cat << \EOF
12397     Defining HAVE_TERMIO
12398 EOF
12399 cat >> confdefs.h <<\EOF
12400 #define HAVE_TERMIO 1
12401 EOF
12402 }
12403
12404 else
12405   echo "$ac_t""no" 1>&6
12406 fi
12407
12408 fi
12409
12410
12411
12412 echo $ac_n "checking for socket""... $ac_c" 1>&6
12413 echo "configure:12414: checking for socket" >&5
12414
12415 cat > conftest.$ac_ext <<EOF
12416 #line 12417 "configure"
12417 #include "confdefs.h"
12418 /* System header to define __stub macros and hopefully few prototypes,
12419     which can conflict with char socket(); below.  */
12420 #include <assert.h>
12421 /* Override any gcc2 internal prototype to avoid an error.  */
12422 /* We use char because int might match the return type of a gcc2
12423     builtin and then its argument prototype would still apply.  */
12424 char socket();
12425
12426 int main() {
12427
12428 /* The GNU C library defines this for functions which it implements
12429     to always fail with ENOSYS.  Some functions are actually named
12430     something starting with __ and the normal name is an alias.  */
12431 #if defined (__stub_socket) || defined (__stub___socket)
12432 choke me
12433 #else
12434 socket();
12435 #endif
12436
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   eval "ac_cv_func_socket=yes"
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   eval "ac_cv_func_socket=no"
12447 fi
12448 rm -f conftest*
12449
12450 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12451   echo "$ac_t""yes" 1>&6
12452   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12453 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12454 echo "configure:12455: checking for netinet/in.h" >&5
12455
12456 cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 #include <netinet/in.h>
12460 EOF
12461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12462 { (eval echo configure:12463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12464 if test -z "$ac_err"; then
12465   rm -rf conftest*
12466   eval "ac_cv_header_$ac_safe=yes"
12467 else
12468   echo "$ac_err" >&5
12469   echo "configure: failed program was:" >&5
12470   cat conftest.$ac_ext >&5
12471   rm -rf conftest*
12472   eval "ac_cv_header_$ac_safe=no"
12473 fi
12474 rm -f conftest*
12475 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12476   echo "$ac_t""yes" 1>&6
12477   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12478 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12479 echo "configure:12480: checking for arpa/inet.h" >&5
12480
12481 cat > conftest.$ac_ext <<EOF
12482 #line 12483 "configure"
12483 #include "confdefs.h"
12484 #include <arpa/inet.h>
12485 EOF
12486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12487 { (eval echo configure:12488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12489 if test -z "$ac_err"; then
12490   rm -rf conftest*
12491   eval "ac_cv_header_$ac_safe=yes"
12492 else
12493   echo "$ac_err" >&5
12494   echo "configure: failed program was:" >&5
12495   cat conftest.$ac_ext >&5
12496   rm -rf conftest*
12497   eval "ac_cv_header_$ac_safe=no"
12498 fi
12499 rm -f conftest*
12500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12501   echo "$ac_t""yes" 1>&6
12502   
12503   { test "$extra_verbose" = "yes" && cat << \EOF
12504     Defining HAVE_SOCKETS
12505 EOF
12506 cat >> confdefs.h <<\EOF
12507 #define HAVE_SOCKETS 1
12508 EOF
12509 }
12510
12511       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12512 echo "configure:12513: checking "for sun_len member in struct sockaddr_un"" >&5
12513       cat > conftest.$ac_ext <<EOF
12514 #line 12515 "configure"
12515 #include "confdefs.h"
12516
12517 #include <sys/types.h>
12518 #include <sys/socket.h>
12519 #include <sys/un.h>
12520       
12521 int main() {
12522 static struct sockaddr_un x; x.sun_len = 1;
12523 ; return 0; }
12524 EOF
12525 if { (eval echo configure:12526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12526   rm -rf conftest*
12527   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12528     Defining HAVE_SOCKADDR_SUN_LEN
12529 EOF
12530 cat >> confdefs.h <<\EOF
12531 #define HAVE_SOCKADDR_SUN_LEN 1
12532 EOF
12533 }
12534
12535 else
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -rf conftest*
12539   echo "$ac_t""no" 1>&6
12540 fi
12541 rm -f conftest*
12542       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12543 echo "configure:12544: checking "for ip_mreq struct in netinet/in.h"" >&5
12544       cat > conftest.$ac_ext <<EOF
12545 #line 12546 "configure"
12546 #include "confdefs.h"
12547
12548 #include <sys/types.h>
12549 #include <netinet/in.h>
12550       
12551 int main() {
12552 static struct ip_mreq x;
12553 ; return 0; }
12554 EOF
12555 if { (eval echo configure:12556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12556   rm -rf conftest*
12557   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12558     Defining HAVE_MULTICAST
12559 EOF
12560 cat >> confdefs.h <<\EOF
12561 #define HAVE_MULTICAST 1
12562 EOF
12563 }
12564
12565 else
12566   echo "configure: failed program was:" >&5
12567   cat conftest.$ac_ext >&5
12568   rm -rf conftest*
12569   echo "$ac_t""no" 1>&6
12570 fi
12571 rm -f conftest*
12572 else
12573   echo "$ac_t""no" 1>&6
12574 fi
12575
12576 else
12577   echo "$ac_t""no" 1>&6
12578 fi
12579
12580 else
12581   echo "$ac_t""no" 1>&6
12582 fi
12583
12584
12585 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12586 echo "configure:12587: checking for msgget" >&5
12587
12588 cat > conftest.$ac_ext <<EOF
12589 #line 12590 "configure"
12590 #include "confdefs.h"
12591 /* System header to define __stub macros and hopefully few prototypes,
12592     which can conflict with char msgget(); below.  */
12593 #include <assert.h>
12594 /* Override any gcc2 internal prototype to avoid an error.  */
12595 /* We use char because int might match the return type of a gcc2
12596     builtin and then its argument prototype would still apply.  */
12597 char msgget();
12598
12599 int main() {
12600
12601 /* The GNU C library defines this for functions which it implements
12602     to always fail with ENOSYS.  Some functions are actually named
12603     something starting with __ and the normal name is an alias.  */
12604 #if defined (__stub_msgget) || defined (__stub___msgget)
12605 choke me
12606 #else
12607 msgget();
12608 #endif
12609
12610 ; return 0; }
12611 EOF
12612 if { (eval echo configure:12613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12613   rm -rf conftest*
12614   eval "ac_cv_func_msgget=yes"
12615 else
12616   echo "configure: failed program was:" >&5
12617   cat conftest.$ac_ext >&5
12618   rm -rf conftest*
12619   eval "ac_cv_func_msgget=no"
12620 fi
12621 rm -f conftest*
12622
12623 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12624   echo "$ac_t""yes" 1>&6
12625   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12626 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12627 echo "configure:12628: checking for sys/ipc.h" >&5
12628
12629 cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 #include <sys/ipc.h>
12633 EOF
12634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12635 { (eval echo configure:12636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12637 if test -z "$ac_err"; then
12638   rm -rf conftest*
12639   eval "ac_cv_header_$ac_safe=yes"
12640 else
12641   echo "$ac_err" >&5
12642   echo "configure: failed program was:" >&5
12643   cat conftest.$ac_ext >&5
12644   rm -rf conftest*
12645   eval "ac_cv_header_$ac_safe=no"
12646 fi
12647 rm -f conftest*
12648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12649   echo "$ac_t""yes" 1>&6
12650   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12651 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12652 echo "configure:12653: checking for sys/msg.h" >&5
12653
12654 cat > conftest.$ac_ext <<EOF
12655 #line 12656 "configure"
12656 #include "confdefs.h"
12657 #include <sys/msg.h>
12658 EOF
12659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12660 { (eval echo configure:12661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12662 if test -z "$ac_err"; then
12663   rm -rf conftest*
12664   eval "ac_cv_header_$ac_safe=yes"
12665 else
12666   echo "$ac_err" >&5
12667   echo "configure: failed program was:" >&5
12668   cat conftest.$ac_ext >&5
12669   rm -rf conftest*
12670   eval "ac_cv_header_$ac_safe=no"
12671 fi
12672 rm -f conftest*
12673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12674   echo "$ac_t""yes" 1>&6
12675   { test "$extra_verbose" = "yes" && cat << \EOF
12676     Defining HAVE_SYSVIPC
12677 EOF
12678 cat >> confdefs.h <<\EOF
12679 #define HAVE_SYSVIPC 1
12680 EOF
12681 }
12682
12683 else
12684   echo "$ac_t""no" 1>&6
12685 fi
12686
12687 else
12688   echo "$ac_t""no" 1>&6
12689 fi
12690
12691 else
12692   echo "$ac_t""no" 1>&6
12693 fi
12694
12695
12696 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12697 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12698 echo "configure:12699: checking for dirent.h" >&5
12699
12700 cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <dirent.h>
12704 EOF
12705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12706 { (eval echo configure:12707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12708 if test -z "$ac_err"; then
12709   rm -rf conftest*
12710   eval "ac_cv_header_$ac_safe=yes"
12711 else
12712   echo "$ac_err" >&5
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_header_$ac_safe=no"
12717 fi
12718 rm -f conftest*
12719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   { test "$extra_verbose" = "yes" && cat << \EOF
12722     Defining SYSV_SYSTEM_DIR
12723 EOF
12724 cat >> confdefs.h <<\EOF
12725 #define SYSV_SYSTEM_DIR 1
12726 EOF
12727 }
12728
12729 else
12730   echo "$ac_t""no" 1>&6
12731 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12732 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12733 echo "configure:12734: checking for sys/dir.h" >&5
12734
12735 cat > conftest.$ac_ext <<EOF
12736 #line 12737 "configure"
12737 #include "confdefs.h"
12738 #include <sys/dir.h>
12739 EOF
12740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12741 { (eval echo configure:12742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12743 if test -z "$ac_err"; then
12744   rm -rf conftest*
12745   eval "ac_cv_header_$ac_safe=yes"
12746 else
12747   echo "$ac_err" >&5
12748   echo "configure: failed program was:" >&5
12749   cat conftest.$ac_ext >&5
12750   rm -rf conftest*
12751   eval "ac_cv_header_$ac_safe=no"
12752 fi
12753 rm -f conftest*
12754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12755   echo "$ac_t""yes" 1>&6
12756   :
12757 else
12758   echo "$ac_t""no" 1>&6
12759 { test "$extra_verbose" = "yes" && cat << \EOF
12760     Defining NONSYSTEM_DIR_LIBRARY
12761 EOF
12762 cat >> confdefs.h <<\EOF
12763 #define NONSYSTEM_DIR_LIBRARY 1
12764 EOF
12765 }
12766
12767 fi
12768
12769 fi
12770
12771
12772 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12773 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12774 echo "configure:12775: checking for nlist.h" >&5
12775
12776 cat > conftest.$ac_ext <<EOF
12777 #line 12778 "configure"
12778 #include "confdefs.h"
12779 #include <nlist.h>
12780 EOF
12781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12782 { (eval echo configure:12783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12784 if test -z "$ac_err"; then
12785   rm -rf conftest*
12786   eval "ac_cv_header_$ac_safe=yes"
12787 else
12788   echo "$ac_err" >&5
12789   echo "configure: failed program was:" >&5
12790   cat conftest.$ac_ext >&5
12791   rm -rf conftest*
12792   eval "ac_cv_header_$ac_safe=no"
12793 fi
12794 rm -f conftest*
12795 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12796   echo "$ac_t""yes" 1>&6
12797   { test "$extra_verbose" = "yes" && cat << \EOF
12798     Defining NLIST_STRUCT
12799 EOF
12800 cat >> confdefs.h <<\EOF
12801 #define NLIST_STRUCT 1
12802 EOF
12803 }
12804
12805 else
12806   echo "$ac_t""no" 1>&6
12807 fi
12808
12809
12810
12811 echo "checking "for sound support"" 1>&6
12812 echo "configure:12813: checking "for sound support"" >&5
12813 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12814
12815 if test "$with_native_sound" != "no"; then
12816     if test -n "$native_sound_lib"; then
12817     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12818 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12819 echo "configure:12820: checking for multimedia/audio_device.h" >&5
12820
12821 cat > conftest.$ac_ext <<EOF
12822 #line 12823 "configure"
12823 #include "confdefs.h"
12824 #include <multimedia/audio_device.h>
12825 EOF
12826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12827 { (eval echo configure:12828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12829 if test -z "$ac_err"; then
12830   rm -rf conftest*
12831   eval "ac_cv_header_$ac_safe=yes"
12832 else
12833   echo "$ac_err" >&5
12834   echo "configure: failed program was:" >&5
12835   cat conftest.$ac_ext >&5
12836   rm -rf conftest*
12837   eval "ac_cv_header_$ac_safe=no"
12838 fi
12839 rm -f conftest*
12840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12841   echo "$ac_t""yes" 1>&6
12842   sound_found=yes sound_cflags=""
12843       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12844    echo "    xemacs will be linked with \"sunplay.o\""
12845  fi
12846 else
12847   echo "$ac_t""no" 1>&6
12848 fi
12849
12850   fi
12851
12852     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12853     sound_found=yes
12854     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12855    echo "    xemacs will be linked with \"sunplay.o\""
12856  fi
12857     if test -d "/usr/demo/SOUND/include"
12858       then sound_cflags="-I/usr/demo/SOUND/include"
12859       else sound_cflags="-I/usr/demo/SOUND"
12860     fi
12861     if test -z "$native_sound_lib" ; then
12862       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12863         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12864         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12865       fi
12866     fi
12867   fi
12868
12869     if test -z "$sound_found"; then
12870     case "$canonical" in
12871     *-sgi-* )
12872       if test -z "$native_sound_lib"; then
12873         
12874 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12875 echo "configure:12876: checking for ALopenport in -laudio" >&5
12876 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12877
12878 xe_check_libs=" -laudio "
12879 cat > conftest.$ac_ext <<EOF
12880 #line 12881 "configure"
12881 #include "confdefs.h"
12882 /* Override any gcc2 internal prototype to avoid an error.  */
12883 /* We use char because int might match the return type of a gcc2
12884     builtin and then its argument prototype would still apply.  */
12885 char ALopenport();
12886
12887 int main() {
12888 ALopenport()
12889 ; return 0; }
12890 EOF
12891 if { (eval echo configure:12892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12892   rm -rf conftest*
12893   eval "ac_cv_lib_$ac_lib_var=yes"
12894 else
12895   echo "configure: failed program was:" >&5
12896   cat conftest.$ac_ext >&5
12897   rm -rf conftest*
12898   eval "ac_cv_lib_$ac_lib_var=no"
12899 fi
12900 rm -f conftest*
12901 xe_check_libs=""
12902
12903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12904   echo "$ac_t""yes" 1>&6
12905   native_sound_lib="-laudio"
12906 else
12907   echo "$ac_t""no" 1>&6
12908 fi
12909
12910
12911       fi
12912       if test -n "$native_sound_lib"; then
12913         sound_found=yes sound_cflags=""
12914         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12915    echo "    xemacs will be linked with \"sgiplay.o\""
12916  fi
12917       fi ;;
12918     hppa*-hp-hpux* )
12919       if test -z "$native_sound_lib"; then
12920         
12921 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12922 echo "configure:12923: checking for AOpenAudio in -lAlib" >&5
12923 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12924
12925 xe_check_libs=" -lAlib "
12926 cat > conftest.$ac_ext <<EOF
12927 #line 12928 "configure"
12928 #include "confdefs.h"
12929 /* Override any gcc2 internal prototype to avoid an error.  */
12930 /* We use char because int might match the return type of a gcc2
12931     builtin and then its argument prototype would still apply.  */
12932 char AOpenAudio();
12933
12934 int main() {
12935 AOpenAudio()
12936 ; return 0; }
12937 EOF
12938 if { (eval echo configure:12939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12939   rm -rf conftest*
12940   eval "ac_cv_lib_$ac_lib_var=yes"
12941 else
12942   echo "configure: failed program was:" >&5
12943   cat conftest.$ac_ext >&5
12944   rm -rf conftest*
12945   eval "ac_cv_lib_$ac_lib_var=no"
12946 fi
12947 rm -f conftest*
12948 xe_check_libs=""
12949
12950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12951   echo "$ac_t""yes" 1>&6
12952   native_sound_lib="-lAlib"
12953 else
12954   echo "$ac_t""no" 1>&6
12955 fi
12956
12957
12958       fi
12959       if test -n "$native_sound_lib"; then
12960         sound_found=yes
12961         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12962    echo "    xemacs will be linked with \"hpplay.o\""
12963  fi
12964         if test "$GCC" = "yes" # Kludge city
12965           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12966           else sound_cflags="+e -I/usr/audio/examples"
12967         fi
12968       fi ;;
12969     esac
12970   fi
12971
12972     if test -z "$sound_found"; then
12973     for dir in "machine" "sys" "linux"; do
12974       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12975 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12976 echo "configure:12977: checking for ${dir}/soundcard.h" >&5
12977
12978 cat > conftest.$ac_ext <<EOF
12979 #line 12980 "configure"
12980 #include "confdefs.h"
12981 #include <${dir}/soundcard.h>
12982 EOF
12983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12984 { (eval echo configure:12985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12986 if test -z "$ac_err"; then
12987   rm -rf conftest*
12988   eval "ac_cv_header_$ac_safe=yes"
12989 else
12990   echo "$ac_err" >&5
12991   echo "configure: failed program was:" >&5
12992   cat conftest.$ac_ext >&5
12993   rm -rf conftest*
12994   eval "ac_cv_header_$ac_safe=no"
12995 fi
12996 rm -f conftest*
12997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12998   echo "$ac_t""yes" 1>&6
12999   sound_found=yes
13000        need_miscplay=yes
13001         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13002    echo "    xemacs will be linked with \"linuxplay.o\""
13003  fi
13004         { test "$extra_verbose" = "yes" && cat << EOF
13005     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13006 EOF
13007 cat >> confdefs.h <<EOF
13008 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13009 EOF
13010 }
13011
13012         break
13013 else
13014   echo "$ac_t""no" 1>&6
13015 fi
13016
13017     done
13018   fi
13019
13020     if test -z "$sound_found"; then
13021     if test "$with_msw" = "yes"; then
13022     sound_found=yes
13023     native_sound_lib=
13024     fi
13025   fi
13026
13027   test "$sound_found" = "yes" && with_native_sound=yes
13028 fi
13029
13030 if test "$with_native_sound" = "yes"; then
13031   { test "$extra_verbose" = "yes" && cat << \EOF
13032     Defining HAVE_NATIVE_SOUND
13033 EOF
13034 cat >> confdefs.h <<\EOF
13035 #define HAVE_NATIVE_SOUND 1
13036 EOF
13037 }
13038
13039   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13040 fi
13041
13042 if test "$with_nas_sound" != "no"; then
13043   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13044 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13045 echo "configure:13046: checking for audio/audiolib.h" >&5
13046
13047 cat > conftest.$ac_ext <<EOF
13048 #line 13049 "configure"
13049 #include "confdefs.h"
13050 #include <audio/audiolib.h>
13051 EOF
13052 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13053 { (eval echo configure:13054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13054 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13055 if test -z "$ac_err"; then
13056   rm -rf conftest*
13057   eval "ac_cv_header_$ac_safe=yes"
13058 else
13059   echo "$ac_err" >&5
13060   echo "configure: failed program was:" >&5
13061   cat conftest.$ac_ext >&5
13062   rm -rf conftest*
13063   eval "ac_cv_header_$ac_safe=no"
13064 fi
13065 rm -f conftest*
13066 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13067   echo "$ac_t""yes" 1>&6
13068   
13069     
13070 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13071 echo "configure:13072: checking for AuOpenServer in -laudio" >&5
13072 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13073
13074 xe_check_libs=" -laudio "
13075 cat > conftest.$ac_ext <<EOF
13076 #line 13077 "configure"
13077 #include "confdefs.h"
13078 /* Override any gcc2 internal prototype to avoid an error.  */
13079 /* We use char because int might match the return type of a gcc2
13080     builtin and then its argument prototype would still apply.  */
13081 char AuOpenServer();
13082
13083 int main() {
13084 AuOpenServer()
13085 ; return 0; }
13086 EOF
13087 if { (eval echo configure:13088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13088   rm -rf conftest*
13089   eval "ac_cv_lib_$ac_lib_var=yes"
13090 else
13091   echo "configure: failed program was:" >&5
13092   cat conftest.$ac_ext >&5
13093   rm -rf conftest*
13094   eval "ac_cv_lib_$ac_lib_var=no"
13095 fi
13096 rm -f conftest*
13097 xe_check_libs=""
13098
13099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13100   echo "$ac_t""yes" 1>&6
13101   have_nas_sound=yes
13102 else
13103   echo "$ac_t""no" 1>&6
13104 fi
13105
13106
13107 else
13108   echo "$ac_t""no" 1>&6
13109 fi
13110
13111   if test "$have_nas_sound" = "yes"; then
13112     with_nas_sound=yes
13113     { test "$extra_verbose" = "yes" && cat << \EOF
13114     Defining HAVE_NAS_SOUND
13115 EOF
13116 cat >> confdefs.h <<\EOF
13117 #define HAVE_NAS_SOUND 1
13118 EOF
13119 }
13120
13121     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13122    echo "    xemacs will be linked with \"nas.o\""
13123  fi
13124     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13125             cat > conftest.$ac_ext <<EOF
13126 #line 13127 "configure"
13127 #include "confdefs.h"
13128 #include <audio/Xtutil.h>
13129 EOF
13130 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13131   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13132   :
13133 else
13134   rm -rf conftest*
13135   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13136     Defining NAS_NO_ERROR_JUMP
13137 EOF
13138 cat >> confdefs.h <<\EOF
13139 #define NAS_NO_ERROR_JUMP 1
13140 EOF
13141 }
13142
13143 fi
13144 rm -f conftest*
13145
13146   else
13147     test "$with_nas_sound" = "yes" && \
13148       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13149     with_nas_sound=no
13150   fi
13151 fi
13152
13153 if test "$with_esd_sound" != "no"; then
13154   # Extract the first word of "esd-config", so it can be a program name with args.
13155 set dummy esd-config; ac_word=$2
13156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13157 echo "configure:13158: checking for $ac_word" >&5
13158
13159 if test -n "$have_esd_config"; then
13160   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13161 else
13162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13163   ac_dummy="$PATH"
13164   for ac_dir in $ac_dummy; do
13165     test -z "$ac_dir" && ac_dir=.
13166     if test -f $ac_dir/$ac_word; then
13167       ac_cv_prog_have_esd_config="yes"
13168       break
13169     fi
13170   done
13171   IFS="$ac_save_ifs"
13172   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13173 fi
13174 have_esd_config="$ac_cv_prog_have_esd_config"
13175 if test -n "$have_esd_config"; then
13176   echo "$ac_t""$have_esd_config" 1>&6
13177 else
13178   echo "$ac_t""no" 1>&6
13179 fi
13180
13181   if test "$have_esd_config" = "yes"; then
13182     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13183     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
13184     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13185     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13186 echo "configure:13187: checking for esd_play_stream" >&5
13187
13188 cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 /* System header to define __stub macros and hopefully few prototypes,
13192     which can conflict with char esd_play_stream(); below.  */
13193 #include <assert.h>
13194 /* Override any gcc2 internal prototype to avoid an error.  */
13195 /* We use char because int might match the return type of a gcc2
13196     builtin and then its argument prototype would still apply.  */
13197 char esd_play_stream();
13198
13199 int main() {
13200
13201 /* The GNU C library defines this for functions which it implements
13202     to always fail with ENOSYS.  Some functions are actually named
13203     something starting with __ and the normal name is an alias.  */
13204 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13205 choke me
13206 #else
13207 esd_play_stream();
13208 #endif
13209
13210 ; return 0; }
13211 EOF
13212 if { (eval echo configure:13213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13213   rm -rf conftest*
13214   eval "ac_cv_func_esd_play_stream=yes"
13215 else
13216   echo "configure: failed program was:" >&5
13217   cat conftest.$ac_ext >&5
13218   rm -rf conftest*
13219   eval "ac_cv_func_esd_play_stream=no"
13220 fi
13221 rm -f conftest*
13222
13223 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13224   echo "$ac_t""yes" 1>&6
13225   have_esd_sound=yes
13226 else
13227   echo "$ac_t""no" 1>&6
13228 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13229 fi
13230
13231   fi
13232
13233   if test "$have_esd_sound" = "yes"; then
13234     with_esd_sound=yes
13235     need_miscplay=yes
13236     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13237    echo "    xemacs will be linked with \"esd.o\""
13238  fi
13239     { test "$extra_verbose" = "yes" && cat << \EOF
13240     Defining HAVE_ESD_SOUND
13241 EOF
13242 cat >> confdefs.h <<\EOF
13243 #define HAVE_ESD_SOUND 1
13244 EOF
13245 }
13246
13247   else
13248     test "$with_esd_sound" = "yes" && \
13249       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13250     with_esd_sound=no
13251   fi
13252 fi
13253
13254 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13255    echo "    xemacs will be linked with \"miscplay.o\""
13256  fi
13257
13258
13259 test -z "$with_tty" && with_tty=yes
13260
13261 if test "$with_tty" = "yes"  ; then
13262   echo "checking for TTY-related features" 1>&6
13263 echo "configure:13264: checking for TTY-related features" >&5
13264   { test "$extra_verbose" = "yes" && cat << \EOF
13265     Defining HAVE_TTY
13266 EOF
13267 cat >> confdefs.h <<\EOF
13268 #define HAVE_TTY 1
13269 EOF
13270 }
13271
13272   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
13273    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\""
13274  fi
13275
13276     if test -z "$with_ncurses"; then
13277     
13278 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13279 echo "configure:13280: checking for tgetent in -lncurses" >&5
13280 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13281
13282 xe_check_libs=" -lncurses "
13283 cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286 /* Override any gcc2 internal prototype to avoid an error.  */
13287 /* We use char because int might match the return type of a gcc2
13288     builtin and then its argument prototype would still apply.  */
13289 char tgetent();
13290
13291 int main() {
13292 tgetent()
13293 ; return 0; }
13294 EOF
13295 if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13296   rm -rf conftest*
13297   eval "ac_cv_lib_$ac_lib_var=yes"
13298 else
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -rf conftest*
13302   eval "ac_cv_lib_$ac_lib_var=no"
13303 fi
13304 rm -f conftest*
13305 xe_check_libs=""
13306
13307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13308   echo "$ac_t""yes" 1>&6
13309   with_ncurses=yes
13310 else
13311   echo "$ac_t""no" 1>&6
13312 with_ncurses=no
13313 fi
13314
13315
13316   fi
13317   if test "$with_ncurses" = "yes"; then
13318     { test "$extra_verbose" = "yes" && cat << \EOF
13319     Defining HAVE_NCURSES
13320 EOF
13321 cat >> confdefs.h <<\EOF
13322 #define HAVE_NCURSES 1
13323 EOF
13324 }
13325
13326     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13327 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13328 echo "configure:13329: checking for ncurses/curses.h" >&5
13329
13330 cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333 #include <ncurses/curses.h>
13334 EOF
13335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13336 { (eval echo configure:13337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13338 if test -z "$ac_err"; then
13339   rm -rf conftest*
13340   eval "ac_cv_header_$ac_safe=yes"
13341 else
13342   echo "$ac_err" >&5
13343   echo "configure: failed program was:" >&5
13344   cat conftest.$ac_ext >&5
13345   rm -rf conftest*
13346   eval "ac_cv_header_$ac_safe=no"
13347 fi
13348 rm -f conftest*
13349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13350   echo "$ac_t""yes" 1>&6
13351   curses_h_file=ncurses/curses.h
13352 else
13353   echo "$ac_t""no" 1>&6
13354 fi
13355
13356     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13357 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13358 echo "configure:13359: checking for ncurses/term.h" >&5
13359
13360 cat > conftest.$ac_ext <<EOF
13361 #line 13362 "configure"
13362 #include "confdefs.h"
13363 #include <ncurses/term.h>
13364 EOF
13365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13366 { (eval echo configure:13367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13368 if test -z "$ac_err"; then
13369   rm -rf conftest*
13370   eval "ac_cv_header_$ac_safe=yes"
13371 else
13372   echo "$ac_err" >&5
13373   echo "configure: failed program was:" >&5
13374   cat conftest.$ac_ext >&5
13375   rm -rf conftest*
13376   eval "ac_cv_header_$ac_safe=no"
13377 fi
13378 rm -f conftest*
13379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13380   echo "$ac_t""yes" 1>&6
13381   term_h_file=ncurses/term.h
13382 else
13383   echo "$ac_t""no" 1>&6
13384 fi
13385
13386     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13387    echo "    xemacs will be linked with \"terminfo.o\""
13388  fi
13389     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13390
13391     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13392                         save_c_switch_site="$c_switch_site"
13393       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13394       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13395 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13396 echo "configure:13397: checking for ncurses/curses.h" >&5
13397
13398 cat > conftest.$ac_ext <<EOF
13399 #line 13400 "configure"
13400 #include "confdefs.h"
13401 #include <ncurses/curses.h>
13402 EOF
13403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13404 { (eval echo configure:13405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13406 if test -z "$ac_err"; then
13407   rm -rf conftest*
13408   eval "ac_cv_header_$ac_safe=yes"
13409 else
13410   echo "$ac_err" >&5
13411   echo "configure: failed program was:" >&5
13412   cat conftest.$ac_ext >&5
13413   rm -rf conftest*
13414   eval "ac_cv_header_$ac_safe=no"
13415 fi
13416 rm -f conftest*
13417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13418   echo "$ac_t""yes" 1>&6
13419   curses_h_file=ncurses/curses.h
13420 else
13421   echo "$ac_t""no" 1>&6
13422 fi
13423
13424       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13425         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13426         else c_switch_site="$save_c_switch_site"
13427       fi
13428     fi
13429   else         if test "$have_terminfo" = "yes"; then
13430       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13431    echo "    xemacs will be linked with \"terminfo.o\""
13432  fi
13433       if test -n "$libs_termcap"; then
13434         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13435       else
13436         for lib in curses termlib termcap; do
13437           
13438 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13439 echo "configure:13440: checking for tgetent in -l$lib" >&5
13440 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13441
13442 xe_check_libs=" -l$lib "
13443 cat > conftest.$ac_ext <<EOF
13444 #line 13445 "configure"
13445 #include "confdefs.h"
13446 /* Override any gcc2 internal prototype to avoid an error.  */
13447 /* We use char because int might match the return type of a gcc2
13448     builtin and then its argument prototype would still apply.  */
13449 char tgetent();
13450
13451 int main() {
13452 tgetent()
13453 ; return 0; }
13454 EOF
13455 if { (eval echo configure:13456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13456   rm -rf conftest*
13457   eval "ac_cv_lib_$ac_lib_var=yes"
13458 else
13459   echo "configure: failed program was:" >&5
13460   cat conftest.$ac_ext >&5
13461   rm -rf conftest*
13462   eval "ac_cv_lib_$ac_lib_var=no"
13463 fi
13464 rm -f conftest*
13465 xe_check_libs=""
13466
13467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13468   echo "$ac_t""yes" 1>&6
13469   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13470 else
13471   echo "$ac_t""no" 1>&6
13472 fi
13473
13474
13475         done
13476       fi
13477     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13478    echo "    xemacs will be linked with \"tparam.o\""
13479  fi
13480                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13481       if test -n "$libs_termcap"; then
13482         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13483       else
13484         
13485 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13486 echo "configure:13487: checking for tgetent in -lcurses" >&5
13487 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13488
13489 xe_check_libs=" -lcurses "
13490 cat > conftest.$ac_ext <<EOF
13491 #line 13492 "configure"
13492 #include "confdefs.h"
13493 /* Override any gcc2 internal prototype to avoid an error.  */
13494 /* We use char because int might match the return type of a gcc2
13495     builtin and then its argument prototype would still apply.  */
13496 char tgetent();
13497
13498 int main() {
13499 tgetent()
13500 ; return 0; }
13501 EOF
13502 if { (eval echo configure:13503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13503   rm -rf conftest*
13504   eval "ac_cv_lib_$ac_lib_var=yes"
13505 else
13506   echo "configure: failed program was:" >&5
13507   cat conftest.$ac_ext >&5
13508   rm -rf conftest*
13509   eval "ac_cv_lib_$ac_lib_var=no"
13510 fi
13511 rm -f conftest*
13512 xe_check_libs=""
13513
13514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13515   echo "$ac_t""yes" 1>&6
13516   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13517 else
13518   echo "$ac_t""no" 1>&6
13519 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13520 echo "configure:13521: checking for tgetent in -ltermcap" >&5
13521 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13522
13523 xe_check_libs=" -ltermcap "
13524 cat > conftest.$ac_ext <<EOF
13525 #line 13526 "configure"
13526 #include "confdefs.h"
13527 /* Override any gcc2 internal prototype to avoid an error.  */
13528 /* We use char because int might match the return type of a gcc2
13529     builtin and then its argument prototype would still apply.  */
13530 char tgetent();
13531
13532 int main() {
13533 tgetent()
13534 ; return 0; }
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13537   rm -rf conftest*
13538   eval "ac_cv_lib_$ac_lib_var=yes"
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -rf conftest*
13543   eval "ac_cv_lib_$ac_lib_var=no"
13544 fi
13545 rm -f conftest*
13546 xe_check_libs=""
13547
13548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13549   echo "$ac_t""yes" 1>&6
13550   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13551 else
13552   echo "$ac_t""no" 1>&6
13553 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13554    echo "    xemacs will be linked with \"termcap.o\""
13555  fi
13556 fi
13557
13558
13559 fi
13560
13561
13562       fi
13563     fi
13564   fi
13565   { test "$extra_verbose" = "yes" && cat << EOF
13566     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13567 EOF
13568 cat >> confdefs.h <<EOF
13569 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13570 EOF
13571 }
13572
13573   { test "$extra_verbose" = "yes" && cat << EOF
13574     Defining TERM_H_FILE = "${term_h_file-term.h}"
13575 EOF
13576 cat >> confdefs.h <<EOF
13577 #define TERM_H_FILE "${term_h_file-term.h}"
13578 EOF
13579 }
13580
13581
13582     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13583 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13584 echo "configure:13585: checking for gpm.h" >&5
13585
13586 cat > conftest.$ac_ext <<EOF
13587 #line 13588 "configure"
13588 #include "confdefs.h"
13589 #include <gpm.h>
13590 EOF
13591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13592 { (eval echo configure:13593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13594 if test -z "$ac_err"; then
13595   rm -rf conftest*
13596   eval "ac_cv_header_$ac_safe=yes"
13597 else
13598   echo "$ac_err" >&5
13599   echo "configure: failed program was:" >&5
13600   cat conftest.$ac_ext >&5
13601   rm -rf conftest*
13602   eval "ac_cv_header_$ac_safe=no"
13603 fi
13604 rm -f conftest*
13605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13606   echo "$ac_t""yes" 1>&6
13607   :
13608 else
13609   echo "$ac_t""no" 1>&6
13610 with_gpm=no
13611 fi
13612  }
13613   test -z "$with_gpm" && { 
13614 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13615 echo "configure:13616: checking for Gpm_Open in -lgpm" >&5
13616 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13617
13618 xe_check_libs=" -lgpm "
13619 cat > conftest.$ac_ext <<EOF
13620 #line 13621 "configure"
13621 #include "confdefs.h"
13622 /* Override any gcc2 internal prototype to avoid an error.  */
13623 /* We use char because int might match the return type of a gcc2
13624     builtin and then its argument prototype would still apply.  */
13625 char Gpm_Open();
13626
13627 int main() {
13628 Gpm_Open()
13629 ; return 0; }
13630 EOF
13631 if { (eval echo configure:13632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13632   rm -rf conftest*
13633   eval "ac_cv_lib_$ac_lib_var=yes"
13634 else
13635   echo "configure: failed program was:" >&5
13636   cat conftest.$ac_ext >&5
13637   rm -rf conftest*
13638   eval "ac_cv_lib_$ac_lib_var=no"
13639 fi
13640 rm -f conftest*
13641 xe_check_libs=""
13642
13643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13644   echo "$ac_t""yes" 1>&6
13645   with_gpm=yes
13646 else
13647   echo "$ac_t""no" 1>&6
13648 with_gpm=no
13649 fi
13650
13651  }
13652   if test "$with_gpm" = "yes"; then
13653     { test "$extra_verbose" = "yes" && cat << \EOF
13654     Defining HAVE_GPM
13655 EOF
13656 cat >> confdefs.h <<\EOF
13657 #define HAVE_GPM 1
13658 EOF
13659 }
13660
13661     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13662    echo "    xemacs will be linked with \"gpmevent.o\""
13663  fi
13664     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13665   fi
13666
13667 else   for feature in ncurses gpm; do
13668     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13669       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13670     fi
13671     eval "with_${feature}=no"
13672   done
13673 fi 
13674 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13675    echo "    xemacs will be linked with \"event-unixoid.o\""
13676  fi
13677
13678
13679 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13680   != "no no no" && echo "checking for database support" 1>&6
13681 echo "configure:13682: checking for database support" >&5
13682
13683 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13684   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13685 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13686 echo "configure:13687: checking for ndbm.h" >&5
13687
13688 cat > conftest.$ac_ext <<EOF
13689 #line 13690 "configure"
13690 #include "confdefs.h"
13691 #include <ndbm.h>
13692 EOF
13693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13694 { (eval echo configure:13695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13696 if test -z "$ac_err"; then
13697   rm -rf conftest*
13698   eval "ac_cv_header_$ac_safe=yes"
13699 else
13700   echo "$ac_err" >&5
13701   echo "configure: failed program was:" >&5
13702   cat conftest.$ac_ext >&5
13703   rm -rf conftest*
13704   eval "ac_cv_header_$ac_safe=no"
13705 fi
13706 rm -f conftest*
13707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13708   echo "$ac_t""yes" 1>&6
13709   :
13710 else
13711   echo "$ac_t""no" 1>&6
13712
13713     test "$with_database_gdbm" = "yes" -o \
13714          "$with_database_dbm"  = "yes" && \
13715       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13716     with_database_gdbm=no with_database_dbm=no
13717 fi
13718
13719 fi
13720
13721 if test "$with_database_gdbm" != "no"; then
13722   
13723 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13724 echo "configure:13725: checking for dbm_open in -lgdbm" >&5
13725 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13726
13727 xe_check_libs=" -lgdbm "
13728 cat > conftest.$ac_ext <<EOF
13729 #line 13730 "configure"
13730 #include "confdefs.h"
13731 /* Override any gcc2 internal prototype to avoid an error.  */
13732 /* We use char because int might match the return type of a gcc2
13733     builtin and then its argument prototype would still apply.  */
13734 char dbm_open();
13735
13736 int main() {
13737 dbm_open()
13738 ; return 0; }
13739 EOF
13740 if { (eval echo configure:13741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13741   rm -rf conftest*
13742   eval "ac_cv_lib_$ac_lib_var=yes"
13743 else
13744   echo "configure: failed program was:" >&5
13745   cat conftest.$ac_ext >&5
13746   rm -rf conftest*
13747   eval "ac_cv_lib_$ac_lib_var=no"
13748 fi
13749 rm -f conftest*
13750 xe_check_libs=""
13751
13752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13753   echo "$ac_t""yes" 1>&6
13754   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13755 else
13756   echo "$ac_t""no" 1>&6
13757 if test "$with_database_gdbm" = "yes"; then
13758      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13759    fi
13760    with_database_gdbm=no
13761 fi
13762
13763
13764 fi
13765
13766 if test "$with_database_dbm" != "no"; then
13767   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13768 echo "configure:13769: checking for dbm_open" >&5
13769
13770 cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773 /* System header to define __stub macros and hopefully few prototypes,
13774     which can conflict with char dbm_open(); below.  */
13775 #include <assert.h>
13776 /* Override any gcc2 internal prototype to avoid an error.  */
13777 /* We use char because int might match the return type of a gcc2
13778     builtin and then its argument prototype would still apply.  */
13779 char dbm_open();
13780
13781 int main() {
13782
13783 /* The GNU C library defines this for functions which it implements
13784     to always fail with ENOSYS.  Some functions are actually named
13785     something starting with __ and the normal name is an alias.  */
13786 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13787 choke me
13788 #else
13789 dbm_open();
13790 #endif
13791
13792 ; return 0; }
13793 EOF
13794 if { (eval echo configure:13795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13795   rm -rf conftest*
13796   eval "ac_cv_func_dbm_open=yes"
13797 else
13798   echo "configure: failed program was:" >&5
13799   cat conftest.$ac_ext >&5
13800   rm -rf conftest*
13801   eval "ac_cv_func_dbm_open=no"
13802 fi
13803 rm -f conftest*
13804
13805 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13806   echo "$ac_t""yes" 1>&6
13807   with_database_dbm=yes libdbm=
13808 else
13809   echo "$ac_t""no" 1>&6
13810
13811     
13812 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13813 echo "configure:13814: checking for dbm_open in -ldbm" >&5
13814 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13815
13816 xe_check_libs=" -ldbm "
13817 cat > conftest.$ac_ext <<EOF
13818 #line 13819 "configure"
13819 #include "confdefs.h"
13820 /* Override any gcc2 internal prototype to avoid an error.  */
13821 /* We use char because int might match the return type of a gcc2
13822     builtin and then its argument prototype would still apply.  */
13823 char dbm_open();
13824
13825 int main() {
13826 dbm_open()
13827 ; return 0; }
13828 EOF
13829 if { (eval echo configure:13830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13830   rm -rf conftest*
13831   eval "ac_cv_lib_$ac_lib_var=yes"
13832 else
13833   echo "configure: failed program was:" >&5
13834   cat conftest.$ac_ext >&5
13835   rm -rf conftest*
13836   eval "ac_cv_lib_$ac_lib_var=no"
13837 fi
13838 rm -f conftest*
13839 xe_check_libs=""
13840
13841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13842   echo "$ac_t""yes" 1>&6
13843   with_database_dbm=yes libdbm=-ldbm
13844 else
13845   echo "$ac_t""no" 1>&6
13846 test "$with_database_dbm" = "yes" && \
13847         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13848       with_database_dbm=no
13849 fi
13850
13851
13852 fi
13853
13854 fi
13855
13856 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13857 test "$with_database_gdbm" = "yes" -o \
13858      "$with_database_dbm"  = "yes" && \
13859   { test "$extra_verbose" = "yes" && cat << \EOF
13860     Defining HAVE_DBM
13861 EOF
13862 cat >> confdefs.h <<\EOF
13863 #define HAVE_DBM 1
13864 EOF
13865 }
13866
13867
13868 if test "$with_database_berkdb" != "no"; then
13869   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13870 echo "configure:13871: checking for Berkeley db.h" >&5
13871   for header in "db/db.h" "db.h"; do
13872     cat > conftest.$ac_ext <<EOF
13873 #line 13874 "configure"
13874 #include "confdefs.h"
13875
13876 #include <stdlib.h>
13877 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13878 #ifdef HAVE_INTTYPES_H
13879 #define __BIT_TYPES_DEFINED__
13880 #include <inttypes.h>
13881 typedef uint8_t  u_int8_t;
13882 typedef uint16_t u_int16_t;
13883 typedef uint32_t u_int32_t;
13884 #ifdef WE_DONT_NEED_QUADS
13885 typedef uint64_t u_int64_t;
13886 #endif
13887 #endif
13888 #endif
13889 #include <$header>
13890
13891 int main() {
13892
13893 ; return 0; }
13894 EOF
13895 if { (eval echo configure:13896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13896   rm -rf conftest*
13897   db_h_file="$header"; break
13898 else
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901 fi
13902 rm -f conftest*
13903   done
13904   if test -z "$db_h_file"
13905   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13906   else echo "$ac_t""$db_h_file" 1>&6
13907   fi
13908
13909   if test "$with_database_berkdb" != "no"; then
13910     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13911 echo "configure:13912: checking for Berkeley DB version" >&5
13912     cat > conftest.$ac_ext <<EOF
13913 #line 13914 "configure"
13914 #include "confdefs.h"
13915 #include <$db_h_file>
13916 #if DB_VERSION_MAJOR > 1
13917 yes
13918 #endif
13919
13920 EOF
13921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13922   egrep "yes" >/dev/null 2>&1; then
13923   rm -rf conftest*
13924   cat > conftest.$ac_ext <<EOF
13925 #line 13926 "configure"
13926 #include "confdefs.h"
13927 #include <$db_h_file>
13928 #if DB_VERSION_MAJOR > 2
13929 yes
13930 #endif
13931
13932 EOF
13933 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13934   egrep "yes" >/dev/null 2>&1; then
13935   rm -rf conftest*
13936   echo "$ac_t""3" 1>&6; dbfunc=db_create
13937 else
13938   rm -rf conftest*
13939   
13940     echo "$ac_t""2" 1>&6; dbfunc=db_open
13941 fi
13942 rm -f conftest*
13943
13944 else
13945   rm -rf conftest*
13946   
13947     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13948 fi
13949 rm -f conftest*
13950
13951     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13952 echo "configure:13953: checking for $dbfunc" >&5
13953
13954 cat > conftest.$ac_ext <<EOF
13955 #line 13956 "configure"
13956 #include "confdefs.h"
13957 /* System header to define __stub macros and hopefully few prototypes,
13958     which can conflict with char $dbfunc(); below.  */
13959 #include <assert.h>
13960 /* Override any gcc2 internal prototype to avoid an error.  */
13961 /* We use char because int might match the return type of a gcc2
13962     builtin and then its argument prototype would still apply.  */
13963 char $dbfunc();
13964
13965 int main() {
13966
13967 /* The GNU C library defines this for functions which it implements
13968     to always fail with ENOSYS.  Some functions are actually named
13969     something starting with __ and the normal name is an alias.  */
13970 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13971 choke me
13972 #else
13973 $dbfunc();
13974 #endif
13975
13976 ; return 0; }
13977 EOF
13978 if { (eval echo configure:13979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13979   rm -rf conftest*
13980   eval "ac_cv_func_$dbfunc=yes"
13981 else
13982   echo "configure: failed program was:" >&5
13983   cat conftest.$ac_ext >&5
13984   rm -rf conftest*
13985   eval "ac_cv_func_$dbfunc=no"
13986 fi
13987 rm -f conftest*
13988
13989 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13990   echo "$ac_t""yes" 1>&6
13991   with_database_berkdb=yes need_libdb=no
13992 else
13993   echo "$ac_t""no" 1>&6
13994
13995     
13996 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13997 echo "configure:13998: checking for $dbfunc in -ldb" >&5
13998 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13999
14000 xe_check_libs=" -ldb "
14001 cat > conftest.$ac_ext <<EOF
14002 #line 14003 "configure"
14003 #include "confdefs.h"
14004 /* Override any gcc2 internal prototype to avoid an error.  */
14005 /* We use char because int might match the return type of a gcc2
14006     builtin and then its argument prototype would still apply.  */
14007 char $dbfunc();
14008
14009 int main() {
14010 $dbfunc()
14011 ; return 0; }
14012 EOF
14013 if { (eval echo configure:14014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14014   rm -rf conftest*
14015   eval "ac_cv_lib_$ac_lib_var=yes"
14016 else
14017   echo "configure: failed program was:" >&5
14018   cat conftest.$ac_ext >&5
14019   rm -rf conftest*
14020   eval "ac_cv_lib_$ac_lib_var=no"
14021 fi
14022 rm -f conftest*
14023 xe_check_libs=""
14024
14025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14026   echo "$ac_t""yes" 1>&6
14027   with_database_berkdb=yes need_libdb=yes
14028 else
14029   echo "$ac_t""no" 1>&6
14030 fi
14031
14032
14033 fi
14034
14035   fi
14036
14037   if test "$with_database_berkdb" = "yes"; then
14038     { test "$extra_verbose" = "yes" && cat << EOF
14039     Defining DB_H_FILE = "$db_h_file"
14040 EOF
14041 cat >> confdefs.h <<EOF
14042 #define DB_H_FILE "$db_h_file"
14043 EOF
14044 }
14045
14046     { test "$extra_verbose" = "yes" && cat << \EOF
14047     Defining HAVE_BERKELEY_DB
14048 EOF
14049 cat >> confdefs.h <<\EOF
14050 #define HAVE_BERKELEY_DB 1
14051 EOF
14052 }
14053
14054     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14055   else with_database_berkdb=no
14056   fi
14057 fi
14058
14059 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14060      != "no no no"; then
14061   { test "$extra_verbose" = "yes" && cat << \EOF
14062     Defining HAVE_DATABASE
14063 EOF
14064 cat >> confdefs.h <<\EOF
14065 #define HAVE_DATABASE 1
14066 EOF
14067 }
14068
14069   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14070    echo "    xemacs will be linked with \"database.o\""
14071  fi
14072 fi
14073
14074 if test "$with_socks" = "yes"; then
14075   
14076 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14077 echo "configure:14078: checking for SOCKSinit in -lsocks" >&5
14078 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14079
14080 xe_check_libs=" -lsocks "
14081 cat > conftest.$ac_ext <<EOF
14082 #line 14083 "configure"
14083 #include "confdefs.h"
14084 /* Override any gcc2 internal prototype to avoid an error.  */
14085 /* We use char because int might match the return type of a gcc2
14086     builtin and then its argument prototype would still apply.  */
14087 char SOCKSinit();
14088
14089 int main() {
14090 SOCKSinit()
14091 ; return 0; }
14092 EOF
14093 if { (eval echo configure:14094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14094   rm -rf conftest*
14095   eval "ac_cv_lib_$ac_lib_var=yes"
14096 else
14097   echo "configure: failed program was:" >&5
14098   cat conftest.$ac_ext >&5
14099   rm -rf conftest*
14100   eval "ac_cv_lib_$ac_lib_var=no"
14101 fi
14102 rm -f conftest*
14103 xe_check_libs=""
14104
14105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14106   echo "$ac_t""yes" 1>&6
14107     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14108     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14109   { test "$extra_verbose" = "yes" && cat << EOF
14110     Defining $ac_tr_lib
14111 EOF
14112 cat >> confdefs.h <<EOF
14113 #define $ac_tr_lib 1
14114 EOF
14115 }
14116
14117   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14118
14119 else
14120   echo "$ac_t""no" 1>&6
14121 fi
14122
14123
14124   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14125     Defining HAVE_SOCKS
14126 EOF
14127 cat >> confdefs.h <<\EOF
14128 #define HAVE_SOCKS 1
14129 EOF
14130 }
14131
14132 fi
14133
14134 if test "$usage_tracking" = "yes"; then
14135   { test "$extra_verbose" = "yes" && cat << \EOF
14136     Defining USAGE_TRACKING
14137 EOF
14138 cat >> confdefs.h <<\EOF
14139 #define USAGE_TRACKING 1
14140 EOF
14141 }
14142
14143   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14144 fi
14145
14146 if test "$with_modules" != "no"; then
14147   echo "checking for module support" 1>&6
14148 echo "configure:14149: checking for module support" >&5
14149
14150     if test "$with_msw" = "yes"; then
14151     have_dl=yes;
14152   else
14153         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14154 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14155 echo "configure:14156: checking for dlfcn.h" >&5
14156
14157 cat > conftest.$ac_ext <<EOF
14158 #line 14159 "configure"
14159 #include "confdefs.h"
14160 #include <dlfcn.h>
14161 EOF
14162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14163 { (eval echo configure:14164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14165 if test -z "$ac_err"; then
14166   rm -rf conftest*
14167   eval "ac_cv_header_$ac_safe=yes"
14168 else
14169   echo "$ac_err" >&5
14170   echo "configure: failed program was:" >&5
14171   cat conftest.$ac_ext >&5
14172   rm -rf conftest*
14173   eval "ac_cv_header_$ac_safe=no"
14174 fi
14175 rm -f conftest*
14176 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14177   echo "$ac_t""yes" 1>&6
14178   
14179       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14180 echo "configure:14181: checking for dlopen in -lc" >&5
14181       cat > conftest.$ac_ext <<EOF
14182 #line 14183 "configure"
14183 #include "confdefs.h"
14184 #include <dlfcn.h>
14185 int main() {
14186         dlopen ("", 0);
14187 ; return 0; }
14188 EOF
14189 if { (eval echo configure:14190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14190   rm -rf conftest*
14191    have_dl=yes 
14192 else
14193   echo "configure: failed program was:" >&5
14194   cat conftest.$ac_ext >&5
14195   rm -rf conftest*
14196   
14197       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14198 echo "configure:14199: checking for dlopen in -ldl" >&5
14199       ac_save_LIBS="$LIBS"
14200       LIBS="-ldl $LIBS"
14201       cat > conftest.$ac_ext <<EOF
14202 #line 14203 "configure"
14203 #include "confdefs.h"
14204 #include <dlfcn.h>
14205 int main() {
14206         dlopen ("", 0);
14207 ; return 0; }
14208 EOF
14209 if { (eval echo configure:14210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14210   rm -rf conftest*
14211    have_dl=yes 
14212 else
14213   echo "configure: failed program was:" >&5
14214   cat conftest.$ac_ext >&5
14215   rm -rf conftest*
14216   LIBS="$ac_save_LIBS"
14217 fi
14218 rm -f conftest*
14219       ac_save_LIBS=
14220 fi
14221 rm -f conftest*
14222 else
14223   echo "$ac_t""no" 1>&6
14224 fi
14225
14226     if test -n "$have_dl"; then
14227       { test "$extra_verbose" = "yes" && cat << \EOF
14228     Defining HAVE_DLOPEN
14229 EOF
14230 cat >> confdefs.h <<\EOF
14231 #define HAVE_DLOPEN 1
14232 EOF
14233 }
14234
14235     else
14236       
14237 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14238 echo "configure:14239: checking for shl_load in -ldld" >&5
14239 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14240
14241 xe_check_libs=" -ldld "
14242 cat > conftest.$ac_ext <<EOF
14243 #line 14244 "configure"
14244 #include "confdefs.h"
14245 /* Override any gcc2 internal prototype to avoid an error.  */
14246 /* We use char because int might match the return type of a gcc2
14247     builtin and then its argument prototype would still apply.  */
14248 char shl_load();
14249
14250 int main() {
14251 shl_load()
14252 ; return 0; }
14253 EOF
14254 if { (eval echo configure:14255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14255   rm -rf conftest*
14256   eval "ac_cv_lib_$ac_lib_var=yes"
14257 else
14258   echo "configure: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   rm -rf conftest*
14261   eval "ac_cv_lib_$ac_lib_var=no"
14262 fi
14263 rm -f conftest*
14264 xe_check_libs=""
14265
14266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14267   echo "$ac_t""yes" 1>&6
14268   libdl=dld have_dl=yes;
14269         { test "$extra_verbose" = "yes" && cat << \EOF
14270     Defining HAVE_SHL_LOAD
14271 EOF
14272 cat >> confdefs.h <<\EOF
14273 #define HAVE_SHL_LOAD 1
14274 EOF
14275 }
14276
14277 else
14278   echo "$ac_t""no" 1>&6
14279
14280 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14281 echo "configure:14282: checking for dld_init in -ldld" >&5
14282 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14283
14284 xe_check_libs=" -ldld "
14285 cat > conftest.$ac_ext <<EOF
14286 #line 14287 "configure"
14287 #include "confdefs.h"
14288 /* Override any gcc2 internal prototype to avoid an error.  */
14289 /* We use char because int might match the return type of a gcc2
14290     builtin and then its argument prototype would still apply.  */
14291 char dld_init();
14292
14293 int main() {
14294 dld_init()
14295 ; return 0; }
14296 EOF
14297 if { (eval echo configure:14298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14298   rm -rf conftest*
14299   eval "ac_cv_lib_$ac_lib_var=yes"
14300 else
14301   echo "configure: failed program was:" >&5
14302   cat conftest.$ac_ext >&5
14303   rm -rf conftest*
14304   eval "ac_cv_lib_$ac_lib_var=no"
14305 fi
14306 rm -f conftest*
14307 xe_check_libs=""
14308
14309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14310   echo "$ac_t""yes" 1>&6
14311   libdl=dld have_dl=yes;
14312         { test "$extra_verbose" = "yes" && cat << \EOF
14313     Defining HAVE_DLD_INIT
14314 EOF
14315 cat >> confdefs.h <<\EOF
14316 #define HAVE_DLD_INIT 1
14317 EOF
14318 }
14319
14320 else
14321   echo "$ac_t""no" 1>&6
14322 fi
14323
14324
14325 fi
14326
14327
14328     fi
14329   fi 
14330   if test -n "$have_dl"; then
14331         
14332 dll_ld=
14333 dll_ldflags=
14334 dll_cflags=
14335 dll_post=
14336 dll_ldo="-o"
14337 ld_dynamic_link_flags=
14338 xehost=$canonical
14339 xealias=$internal_configuration
14340
14341 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14342 echo "configure:14343: checking how to build dynamic libraries for ${xehost}" >&5
14343 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14344 case "$xehost" in
14345 *-*-linux-gnu*) ;;
14346 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14347 esac
14348
14349 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14350 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14351 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14352
14353 case "$xehost_os" in
14354 aix3*)
14355   # AIX sometimes has problems with the GCC collect2 program.  For some
14356   # reason, if we set the COLLECT_NAMES environment variable, the problems
14357   # vanish in a puff of smoke.
14358   if test "${COLLECT_NAMES+set}" != set; then
14359     COLLECT_NAMES=
14360     export COLLECT_NAMES
14361   fi
14362   ;;
14363 esac
14364
14365 # Now see if the compiler is really GCC.
14366 if test "$GCC" = "yes"; then
14367   XEGCC=yes
14368 else
14369   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14370 echo "configure:14371: checking checking whether we are using GNU C" >&5
14371   cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374
14375 #ifdef __GNUC__
14376   yes;
14377 #endif
14378
14379 EOF
14380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14381   egrep "yes" >/dev/null 2>&1; then
14382   rm -rf conftest*
14383   XEGCC=yes
14384 else
14385   rm -rf conftest*
14386   XEGCC=no
14387 fi
14388 rm -f conftest*
14389
14390   echo "$ac_t""${XEGCC}" 1>&6
14391 fi
14392
14393 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14394 echo "configure:14395: checking how to produce PIC code" >&5
14395 wl=
14396
14397 can_build_shared=yes
14398 if test "$XEGCC" = yes; then
14399   wl='-Wl,'
14400
14401   case "$xehost_os" in
14402   aix[3-9]* | irix[5-9]* | osf[3-9])
14403     # PIC is the default for these OSes.
14404     ;;
14405
14406   os2*)
14407     # We can build DLLs from non-PIC.
14408     ;;
14409   amigaos*)
14410     # FIXME: we need at least 68020 code to build shared libraries, but
14411     # adding the `-m68020' flag to GCC prevents building anything better,
14412     # like `-m68040'.
14413     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14414     ;;
14415   *cygwin* | *mingw* )
14416     # PIC is the default
14417     ;;
14418   *)
14419     dll_cflags='-fPIC'
14420     ;;
14421   esac
14422 else
14423   # PORTME Check for PIC flags for the system compiler.
14424   case "$xehost_os" in
14425   hpux9* | hpux1[0-9]*)
14426     # Is there a better link_static_flag that works with the bundled CC?
14427     wl='-Wl,'
14428     dll_cflags='+Z'
14429     ;;
14430
14431   irix[5-9]*)
14432     wl='-Wl,'
14433     # PIC (with -KPIC) is the default.
14434     ;;
14435
14436   os2*)
14437     # We can build DLLs from non-PIC.
14438     ;;
14439
14440   osf[3-9]*)
14441     # All OSF/1 code is PIC.
14442     wl='-Wl,'
14443     ;;
14444
14445   aix[3-9]*)
14446     # All AIX code is PIC.
14447     wl='-Wl,'
14448     ;;
14449
14450   sco3.2v5*)
14451     dll_cflags='-belf -Kpic'
14452     wl='-Wl,'
14453     ;;
14454
14455   unixware*)
14456     dll_cflags="-KPIC"
14457     wl="-Wl,"
14458     ;;
14459
14460   sysv4*)
14461     dll_cflags="-KPIC"
14462     wl="-Wl,"
14463     ;;
14464
14465   sysv5*)
14466     dll_cflags="-KPIC"
14467     wl="-Wl,"
14468     ;;
14469
14470   solaris2*)
14471     dll_cflags='-KPIC'
14472     wl='-Wl,'
14473     ;;
14474
14475   sunos4*)
14476     dll_cflags='-PIC'
14477     wl='-Qoption ld '
14478     ;;
14479
14480   uts4*)
14481     dll_cflags='-pic'
14482     ;;
14483
14484   *)
14485     can_build_shared=no
14486     ;;
14487   esac
14488 fi
14489
14490 if test -n "$dll_cflags"; then
14491   echo "$ac_t""${dll_cflags}" 1>&6
14492
14493   # Check to make sure the dll_cflags actually works.
14494   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14495 echo "configure:14496: checking if PIC flag ${dll_cflags} really works" >&5
14496   save_CFLAGS="$CFLAGS"
14497   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14498   cat > conftest.$ac_ext <<EOF
14499 #line 14500 "configure"
14500 #include "confdefs.h"
14501
14502 int main() {
14503 int x=0;
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14507   rm -rf conftest*
14508   
14509     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14510     # reports no error.  So, we need to grep stderr for (Bundled).
14511     if grep '(Bundled)' config.log >/dev/null; then
14512       echo "$ac_t""no" 1>&6
14513       can_build_shared=no
14514       dll_cflags=
14515     else
14516       echo "$ac_t""yes" 1>&6
14517     fi
14518 else
14519   echo "configure: failed program was:" >&5
14520   cat conftest.$ac_ext >&5
14521   rm -rf conftest*
14522   echo "$ac_t""no" 1>&6
14523     can_build_shared=no
14524     dll_cflags=
14525 fi
14526 rm -f conftest*
14527   CFLAGS="$save_CFLAGS"
14528 else
14529   echo "$ac_t""none" 1>&6
14530 fi
14531
14532 if test "$can_build_shared" = "yes"; then
14533 cc_produces_so=no
14534 xldf=
14535 xcldf=
14536 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14537 echo "configure:14538: checking if C compiler can produce shared libraries" >&5
14538 if test "$XEGCC" = yes; then
14539   xcldf="-shared"
14540   xldf="-shared"
14541 else # Not using GCC
14542   case "$xehost_os" in
14543     aix[3-9]*)
14544       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14545       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14546       ;;
14547
14548     freebsd2* | netbsd* | openbsd*)
14549       xldf="-Bshareable"
14550       xcldf="${wl}-Bshareable"
14551       ;;
14552
14553     freebsd3*)
14554       xcldf="-shared"
14555       ;;
14556
14557     hpux*)
14558       xldf="-b +s"
14559       xcldf="${wl}-b ${wl}+s"
14560       ;;
14561
14562     irix[5-9]* | osf[3-9]*)
14563       xcldf="${wl}-shared"
14564       xldf="-shared"
14565       ;;
14566
14567     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14568       xcldf="-G"
14569       xldf="-G"
14570       ;;
14571
14572     sunos4*)
14573       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14574       xldf="-assert pure-text -Bstatic"
14575       ;;
14576   esac
14577 fi # End if if we are using gcc
14578
14579 if test -n "$xcldf"; then
14580   save_LDFLAGS=$LDFLAGS
14581   save_LIBS=$LIBS
14582   save_xe_libs=$xe_libs
14583   LDFLAGS="$xcldf $LDFLAGS"
14584   LIBS=
14585   xe_libs=
14586   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14587   cat > conftest.$ac_ext <<EOF
14588 #line 14589 "configure"
14589 #include "confdefs.h"
14590
14591 int main() {
14592 int x=0;
14593 ; return 0; }
14594 EOF
14595 if { (eval echo configure:14596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14596   rm -rf conftest*
14597   cc_produces_so=yes
14598 else
14599   echo "configure: failed program was:" >&5
14600   cat conftest.$ac_ext >&5
14601   rm -rf conftest*
14602   cc_produces_so=no
14603 fi
14604 rm -f conftest*
14605   LDFLAGS=$save_LDFLAGS
14606   LIBS=$save_LIBS
14607   xe_libs=$save_xe_libs
14608   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14609 else
14610   cc_produces_so=no
14611 fi
14612 echo "$ac_t""${cc_produces_so}" 1>&6
14613
14614 LTLD=$LD
14615 if test -z "$LTLD"; then
14616   ac_prog=ld
14617   if test "$XEGCC" = yes; then
14618     # Check if gcc -print-prog-name=ld gives a path.
14619     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14620 echo "configure:14621: checking for ld used by GCC" >&5
14621     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14622     case "$ac_prog" in
14623     # Accept absolute paths.
14624     /*)
14625       if test -z "$LTLD"; then
14626         case "$ac_prog" in
14627           *gcc-lib*) LTLD="$CC"
14628                      ;;
14629           *)         LTLD="$ac_prog"
14630                      ;;
14631         esac
14632       fi
14633       ;;
14634     "")
14635       # If it fails, then pretend we aren't using GCC.
14636       ac_prog=ld
14637       ;;
14638     *)
14639       # If it is relative, then search for the first ld in PATH.
14640       with_gnu_ld=unknown
14641       ;;
14642     esac
14643   else
14644     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14645 echo "configure:14646: checking for GNU ld" >&5
14646   fi
14647
14648   if test -z "$LTLD"; then
14649     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14650     for ac_dir in $PATH; do
14651       test -z "$ac_dir" && ac_dir=.
14652       if test -f "$ac_dir/$ac_prog"; then
14653         LTLD="$ac_dir/$ac_prog"
14654         # Check to see if the program is GNU ld.  I'd rather use --version,
14655         # but apparently some GNU ld's only accept -v.
14656         # Break only if it was the GNU/non-GNU ld that we prefer.
14657         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14658           xe_gnu_ld=yes
14659         else
14660           xe_gnu_ld=no
14661         fi
14662       fi
14663     done
14664     IFS="$ac_save_ifs"
14665   fi
14666
14667   if test -n "$LTLD"; then
14668     echo "$ac_t""${LTLD}" 1>&6
14669   else
14670     echo "$ac_t""no" 1>&6
14671   fi
14672
14673   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14674     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14675     exit 1
14676   fi
14677 fi
14678
14679 ld_dynamic_link_flags=
14680
14681 # Check to see if it really is or isn't GNU ld.
14682 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14683 echo "configure:14684: checking if the linker is GNU ld" >&5
14684 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14685 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14686   xe_gnu_ld=yes
14687 else
14688   xe_gnu_ld=no
14689 fi
14690 echo "$ac_t""${xe_gnu_ld}" 1>&6
14691
14692 case "$xehost_os" in
14693   amigaos* | sunos4*)
14694     # On these operating systems, we should treat GNU ld like the system ld.
14695     gnu_ld_acts_native=yes
14696     ;;
14697   *)
14698     gnu_ld_acts_native=no
14699     ;;
14700 esac
14701
14702 if test "$cc_produces_so" = "yes"; then
14703   dll_ld=$CC
14704   dll_ldflags=$xcldf
14705   can_build_shared=yes
14706   ld_shlibs=yes
14707 else
14708   # OK - only NOW do we futz about with ld.
14709   # See if the linker supports building shared libraries.
14710   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14711 echo "configure:14712: checking whether the linker supports shared libraries" >&5
14712   dll_ld=$CC
14713   dll_ldflags=$LDFLAGS
14714   ld_shlibs=yes
14715   can_build_shared=yes
14716   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14717     # See if GNU ld supports shared libraries.
14718     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14719       dll_ld=$CC
14720       dll_ldflags="-shared"
14721       ld_shlibs=yes
14722     else
14723       ld_shlibs=no
14724     fi
14725   else
14726     # PORTME fill in a description of your system's linker (not GNU ld)
14727     case "$xehost_os" in
14728     aix3*)
14729       dll_ld=$LTLD
14730       dll_ldflags=$xldf
14731       ;;
14732
14733     aix[4-9]*)
14734       dll_ldflags=$xcldf
14735       ;;
14736
14737     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14738     # support.  Future versions do this automatically, but an explicit c++rt0.o
14739     # doesn't break anything, and helps significantly (at the cost of a little
14740     # extra space).
14741     freebsd2.2*)
14742       dll_ld=$LTLD
14743       dll_ldflags=$xldf
14744       dll_post="/usr/lib/c++rt0.o"
14745       ;;
14746
14747     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14748     freebsd2*)
14749       dll_ld=$LTLD
14750       dll_ldflags="-Bshareable"
14751       ;;
14752
14753     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14754     freebsd3*)
14755       dll_ldflags="-shared"
14756       ;;
14757
14758     hpux*)
14759       dll_ld=$LTLD
14760       dll_ldflags=$xldf
14761       ;;
14762
14763     irix[5-9]*)
14764       dll_ld=$LTLD
14765       dll_ldflags=$xldf
14766       ;;
14767
14768     netbsd*)
14769       # Tested with NetBSD 1.2 ld
14770       dll_ld=$LTLD
14771       dll_ldflags=$xldf
14772       ;;
14773
14774     openbsd*)
14775       dll_ld=$LTLD
14776       dll_ldflags=$xldf
14777       ;;
14778
14779     osf3* | osf4*)
14780       dll_ld=$LTLD
14781       dll_ldflags=$xldf
14782       ;;
14783
14784     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14785     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14786       dll_ld=$LTLD
14787       case "$dll_ld" in
14788         *gcc*) dll_ldflags="-shared"
14789                dll_ld=$CC
14790                ;;
14791         *)     dll_ldflags="-G"
14792                ;;
14793       esac
14794       ;;
14795
14796     sunos4*)
14797       if test "$XEGCC" = yes; then
14798         dll_ld=$CC
14799       else
14800         dll_ld=$LTLD
14801       fi
14802       dll_ldflags=$xldf
14803       ;;
14804
14805     uts4*)
14806       dll_ld=$LTLD
14807       dll_ldflags="-G"
14808       ;;
14809
14810     bsdi*)
14811       dll_ldflags="-r"
14812       dll_ld="shlicc2"
14813       ;;
14814
14815     *)
14816       ld_shlibs=no
14817       can_build_shared=no
14818       ;;
14819     esac
14820   fi
14821   echo "$ac_t""${ld_shlibs}" 1>&6
14822   if test "$ld_shlibs" = "no"; then
14823     can_build_shared=no
14824   fi
14825 fi # End of if cc_produces_so = no
14826
14827
14828 if test "$xe_gnu_ld" = yes; then
14829   if test "$ld_shlibs" = yes; then
14830     ld_dynamic_link_flags="${wl}-export-dynamic"
14831   fi
14832 fi
14833
14834 if test -z "$ld_dynamic_link_flags"; then
14835   case "$xehost_os" in
14836   aix[3-9]*)
14837     ld_dynamic_link_flags=
14838     ;;
14839
14840   freebsd2.2*)
14841     ld_dynamic_link_flags=
14842     ;;
14843
14844   freebsd2*)
14845     ld_dynamic_link_flags=
14846     ;;
14847
14848   freebsd3*)
14849     ld_dynamic_link_flags=
14850     ;;
14851
14852   hpux*)
14853     ld_dynamic_link_flags="${wl}-E"
14854     ;;
14855
14856   irix[5-9]*)
14857     ld_dynamic_link_flags=
14858     ;;
14859
14860   netbsd*)
14861     ld_dynamic_link_flags=
14862     ;;
14863
14864   openbsd*)
14865     ld_dynamic_link_flags=
14866     ;;
14867
14868   osf3* | osf4*)
14869     ld_dynamic_link_flags=
14870     ;;
14871
14872   solaris2* | solaris7*)
14873     ld_dynamic_link_flags=
14874     ;;
14875
14876   sco3.2v5* | unixware* | sysv5* | sysv4*)
14877     ld_dynamic_link_flags="${wl}-Bexport"
14878     ;;
14879
14880   sunos4*)
14881     ld_dynamic_link_flags=
14882     ;;
14883
14884   uts4*)
14885     ld_dynamic_link_flags=
14886     ;;
14887
14888   bsdi*)
14889     ld_dynamic_link_flags=
14890     ;;
14891
14892   esac
14893 fi # End of if -z ld_dynamic_link_flags
14894 fi # End of if test "$can_build_shared" = "yes"
14895
14896
14897
14898
14899
14900
14901
14902
14903   fi
14904
14905   if test "$can_build_shared" = "yes"; then
14906     { test "$extra_verbose" = "yes" && cat << \EOF
14907     Defining HAVE_SHLIB
14908 EOF
14909 cat >> confdefs.h <<\EOF
14910 #define HAVE_SHLIB 1
14911 EOF
14912 }
14913
14914     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14915    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14916  fi
14917     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14918     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14919     for ac_func in dlerror _dlerror
14920 do
14921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14922 echo "configure:14923: checking for $ac_func" >&5
14923
14924 cat > conftest.$ac_ext <<EOF
14925 #line 14926 "configure"
14926 #include "confdefs.h"
14927 /* System header to define __stub macros and hopefully few prototypes,
14928     which can conflict with char $ac_func(); below.  */
14929 #include <assert.h>
14930 /* Override any gcc2 internal prototype to avoid an error.  */
14931 /* We use char because int might match the return type of a gcc2
14932     builtin and then its argument prototype would still apply.  */
14933 char $ac_func();
14934
14935 int main() {
14936
14937 /* The GNU C library defines this for functions which it implements
14938     to always fail with ENOSYS.  Some functions are actually named
14939     something starting with __ and the normal name is an alias.  */
14940 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14941 choke me
14942 #else
14943 $ac_func();
14944 #endif
14945
14946 ; return 0; }
14947 EOF
14948 if { (eval echo configure:14949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14949   rm -rf conftest*
14950   eval "ac_cv_func_$ac_func=yes"
14951 else
14952   echo "configure: failed program was:" >&5
14953   cat conftest.$ac_ext >&5
14954   rm -rf conftest*
14955   eval "ac_cv_func_$ac_func=no"
14956 fi
14957 rm -f conftest*
14958
14959 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14960   echo "$ac_t""yes" 1>&6
14961     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14962   { test "$extra_verbose" = "yes" && cat << EOF
14963     Defining $ac_tr_func
14964 EOF
14965 cat >> confdefs.h <<EOF
14966 #define $ac_tr_func 1
14967 EOF
14968 }
14969  
14970 else
14971   echo "$ac_t""no" 1>&6
14972 fi
14973 done
14974
14975     with_modules=yes
14976   else
14977     if test "$with_modules" = "yes"; then
14978       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14979     else
14980       echo "configure: warning: "Module support cannot be provided."" 1>&2
14981     fi
14982     with_modules=no
14983   fi
14984 fi
14985
14986 cat > conftest.$ac_ext <<EOF
14987 #line 14988 "configure"
14988 #include "confdefs.h"
14989 int main(int c,char *v[]){return 0;}
14990 EOF
14991 if { (eval echo configure:14992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14992 then
14993   :
14994 else
14995   conftest_rc="$?"
14996   echo "configure: failed program was:" >&5
14997   cat conftest.$ac_ext >&5
14998   rm -fr conftest*
14999   
15000   echo ""
15001   echo "*** PANIC *** The C compiler can no longer build working executables."
15002   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15003   echo "*** PANIC *** The most likely reason for this problem is that configure"
15004   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15005   echo "*** PANIC *** found at run time."
15006   echo "*** PANIC ***"
15007   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15008   echo "*** PANIC *** On other systems, try telling configure where to find the"
15009   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15010   echo "*** PANIC ***"
15011   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15012   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15013   echo "*** PANIC *** on your system.  Don't do that."
15014   exit 1
15015 fi
15016 rm -fr conftest*
15017
15018 if test "$win32_processes" = "yes"; then
15019   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15020    echo "    xemacs will be linked with \"process-nt.o\""
15021  fi
15022 else
15023   { test "$extra_verbose" = "yes" && cat << \EOF
15024     Defining HAVE_UNIX_PROCESSES
15025 EOF
15026 cat >> confdefs.h <<\EOF
15027 #define HAVE_UNIX_PROCESSES 1
15028 EOF
15029 }
15030
15031   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15032    echo "    xemacs will be linked with \"process-unix.o\""
15033  fi
15034 fi
15035
15036
15037
15038 T=""
15039 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15040 CFLAGS="$T"
15041
15042
15043 T=""
15044 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15045 extra_objs="$T"
15046
15047
15048 T=""
15049 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
15050 c_switch_general="$T"
15051
15052
15053 T=""
15054 for W in $c_switch_x_site $c_switch_gtk $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15055 c_switch_window_system="$T"
15056
15057
15058 T=""
15059 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15060 c_switch_all="$T"
15061
15062
15063 T=""
15064 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
15065 ld_switch_general="$T"
15066
15067
15068 T=""
15069 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15070 ld_switch_window_system="$T"
15071
15072
15073 T=""
15074 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15075 ld_switch_all="$T"
15076
15077
15078 T=""
15079 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15080 ld_libs_general="$T"
15081
15082
15083 T=""
15084 for W in $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15085 ld_libs_window_system="$T"
15086
15087
15088 T=""
15089 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15090 ld_libs_all="$T"
15091
15092
15093
15094 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15095 internal_makefile_list="Makefile.in"
15096 SUBDIR_MAKEFILES=''
15097 test -d lock || mkdir lock
15098 for dir in $MAKE_SUBDIR; do
15099   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15100         test -d "$d" || mkdir "$d"; cd "$d"
15101       done ) ;;
15102    * ) test -d "$dir" || mkdir "$dir" ;;
15103   esac
15104   
15105 T=""
15106 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15107 SUBDIR_MAKEFILES="$T"
15108
15109   
15110 T=""
15111 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15112 internal_makefile_list="$T"
15113
15114 done
15115
15116
15117
15118
15119 for dir in src/s src/m; do
15120   if test ! -d "$dir" ; then
15121     echo Making symbolic link to "$srcdir/$dir"
15122     ${LN_S} "$srcdir/$dir" "$dir"
15123   fi
15124 done
15125
15126 if test "$extra_verbose" = "yes"; then
15127   echo ""
15128   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
15129   echo ""
15130 fi
15131
15132
15133 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15134   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15135   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15136 fi
15137
15138 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15139   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15140   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15141 fi
15142
15143 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15144   test "$extra_verbose" = "yes" && echo "creating TAGS"
15145   echo "\f
15146 $srcdir/TAGS,include" > "TAGS"
15147 fi
15148
15149 if test "$__SUNPRO_C" = "yes"; then
15150   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15151   ( echo "# For use with Sun WorkShop's Source browser."
15152     echo "# See sbquery(1) and sbinit(4) for more information"
15153     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15154   ) > .sbinit
15155 fi
15156
15157 rm -f core
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178 PREFIX=$prefix
15179 while true; do
15180   case "$PREFIX" in
15181     *\$* ) eval "PREFIX=$PREFIX" ;;
15182     *) break ;;
15183   esac
15184 done
15185
15186
15187
15188
15189 EXEC_PREFIX=$exec_prefix
15190 while true; do
15191   case "$EXEC_PREFIX" in
15192     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15193     *) break ;;
15194   esac
15195 done
15196
15197
15198
15199
15200 INFODIR=$infodir
15201 while true; do
15202   case "$INFODIR" in
15203     *\$* ) eval "INFODIR=$INFODIR" ;;
15204     *) break ;;
15205   esac
15206 done
15207
15208
15209
15210
15211 INFOPATH=$infopath
15212 while true; do
15213   case "$INFOPATH" in
15214     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15215     *) break ;;
15216   esac
15217 done
15218
15219
15220
15221
15222 PACKAGE_PATH=$package_path
15223 while true; do
15224   case "$PACKAGE_PATH" in
15225     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15226     *) break ;;
15227   esac
15228 done
15229
15230
15231
15232
15233 LISPDIR=$lispdir
15234 while true; do
15235   case "$LISPDIR" in
15236     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15237     *) break ;;
15238   esac
15239 done
15240
15241
15242
15243
15244 MODULEDIR=$moduledir
15245 while true; do
15246   case "$MODULEDIR" in
15247     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15248     *) break ;;
15249   esac
15250 done
15251
15252
15253
15254
15255 SITELISPDIR=$sitelispdir
15256 while true; do
15257   case "$SITELISPDIR" in
15258     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15259     *) break ;;
15260   esac
15261 done
15262
15263
15264
15265
15266 SITEMODULEDIR=$sitemoduledir
15267 while true; do
15268   case "$SITEMODULEDIR" in
15269     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15270     *) break ;;
15271   esac
15272 done
15273
15274
15275
15276
15277 ETCDIR=$etcdir
15278 while true; do
15279   case "$ETCDIR" in
15280     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15281     *) break ;;
15282   esac
15283 done
15284
15285
15286
15287
15288 DOCDIR=$docdir
15289 while true; do
15290   case "$DOCDIR" in
15291     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15292     *) break ;;
15293   esac
15294 done
15295
15296
15297
15298
15299 ARCHLIBDIR=$archlibdir
15300 while true; do
15301   case "$ARCHLIBDIR" in
15302     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15303     *) break ;;
15304   esac
15305 done
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15327
15328
15329
15330
15331
15332
15333
15334 : ${XEMACS_CC:=$CC}
15335
15336
15337 if test "$with_prefix" = "yes"; then
15338   { test "$extra_verbose" = "yes" && cat << \EOF
15339     Defining PREFIX_USER_DEFINED
15340 EOF
15341 cat >> confdefs.h <<\EOF
15342 #define PREFIX_USER_DEFINED 1
15343 EOF
15344 }
15345
15346 fi
15347
15348 if test "$with_site_lisp" = "no"; then
15349   { test "$extra_verbose" = "yes" && cat << \EOF
15350     Defining INHIBIT_SITE_LISP
15351 EOF
15352 cat >> confdefs.h <<\EOF
15353 #define INHIBIT_SITE_LISP 1
15354 EOF
15355 }
15356
15357 fi
15358 if test "$with_site_modules" = "no"; then
15359   { test "$extra_verbose" = "yes" && cat << \EOF
15360     Defining INHIBIT_SITE_MODULES
15361 EOF
15362 cat >> confdefs.h <<\EOF
15363 #define INHIBIT_SITE_MODULES 1
15364 EOF
15365 }
15366
15367 fi
15368
15369
15370 T=""
15371 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15372 ac_configure_args="$T"
15373
15374 { test "$extra_verbose" = "yes" && cat << EOF
15375     Defining EMACS_CONFIGURATION = "$configuration"
15376 EOF
15377 cat >> confdefs.h <<EOF
15378 #define EMACS_CONFIGURATION "$configuration"
15379 EOF
15380 }
15381
15382 { test "$extra_verbose" = "yes" && cat << EOF
15383     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15384 EOF
15385 cat >> confdefs.h <<EOF
15386 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15387 EOF
15388 }
15389
15390
15391
15392 null_string=""
15393 { test "$extra_verbose" = "yes" && cat << EOF
15394     Defining LD_SWITCH_X_SITE = $null_string
15395 EOF
15396 cat >> confdefs.h <<EOF
15397 #define LD_SWITCH_X_SITE $null_string
15398 EOF
15399 }
15400
15401 { test "$extra_verbose" = "yes" && cat << EOF
15402     Defining LD_SWITCH_X_SITE_AUX = $null_string
15403 EOF
15404 cat >> confdefs.h <<EOF
15405 #define LD_SWITCH_X_SITE_AUX $null_string
15406 EOF
15407 }
15408
15409 { test "$extra_verbose" = "yes" && cat << EOF
15410     Defining C_SWITCH_X_SITE = $null_string
15411 EOF
15412 cat >> confdefs.h <<EOF
15413 #define C_SWITCH_X_SITE $null_string
15414 EOF
15415 }
15416
15417 { test "$extra_verbose" = "yes" && cat << EOF
15418     Defining LD_SWITCH_SITE = $null_string
15419 EOF
15420 cat >> confdefs.h <<EOF
15421 #define LD_SWITCH_SITE $null_string
15422 EOF
15423 }
15424
15425 { test "$extra_verbose" = "yes" && cat << EOF
15426     Defining C_SWITCH_SITE = $null_string
15427 EOF
15428 cat >> confdefs.h <<EOF
15429 #define C_SWITCH_SITE $null_string
15430 EOF
15431 }
15432
15433
15434
15435 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15436     Defining GNU_MALLOC
15437 EOF
15438 cat >> confdefs.h <<\EOF
15439 #define GNU_MALLOC 1
15440 EOF
15441 }
15442
15443 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15444     Defining USE_SYSTEM_MALLOC
15445 EOF
15446 cat >> confdefs.h <<\EOF
15447 #define USE_SYSTEM_MALLOC 1
15448 EOF
15449 }
15450
15451 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15452     Defining USE_DEBUG_MALLOC
15453 EOF
15454 cat >> confdefs.h <<\EOF
15455 #define USE_DEBUG_MALLOC 1
15456 EOF
15457 }
15458
15459                                               { test "$extra_verbose" = "yes" && cat << \EOF
15460     Defining USE_SYSTEM_MALLOC
15461 EOF
15462 cat >> confdefs.h <<\EOF
15463 #define USE_SYSTEM_MALLOC 1
15464 EOF
15465 }
15466
15467 fi
15468 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15469     Defining I18N3
15470 EOF
15471 cat >> confdefs.h <<\EOF
15472 #define I18N3 1
15473 EOF
15474 }
15475
15476 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15477     Defining USE_GCC
15478 EOF
15479 cat >> confdefs.h <<\EOF
15480 #define USE_GCC 1
15481 EOF
15482 }
15483
15484 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15485     Defining EXTERNAL_WIDGET
15486 EOF
15487 cat >> confdefs.h <<\EOF
15488 #define EXTERNAL_WIDGET 1
15489 EOF
15490 }
15491
15492 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15493     Defining QUICK_BUILD
15494 EOF
15495 cat >> confdefs.h <<\EOF
15496 #define QUICK_BUILD 1
15497 EOF
15498 }
15499
15500 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15501     Defining PURIFY
15502 EOF
15503 cat >> confdefs.h <<\EOF
15504 #define PURIFY 1
15505 EOF
15506 }
15507
15508 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15509     Defining QUANTIFY
15510 EOF
15511 cat >> confdefs.h <<\EOF
15512 #define QUANTIFY 1
15513 EOF
15514 }
15515
15516 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15517     Defining MAIL_USE_POP
15518 EOF
15519 cat >> confdefs.h <<\EOF
15520 #define MAIL_USE_POP 1
15521 EOF
15522 }
15523
15524 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15525     Defining KERBEROS
15526 EOF
15527 cat >> confdefs.h <<\EOF
15528 #define KERBEROS 1
15529 EOF
15530 }
15531
15532 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15533     Defining HESIOD
15534 EOF
15535 cat >> confdefs.h <<\EOF
15536 #define HESIOD 1
15537 EOF
15538 }
15539
15540 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15541     Defining USE_UNION_TYPE
15542 EOF
15543 cat >> confdefs.h <<\EOF
15544 #define USE_UNION_TYPE 1
15545 EOF
15546 }
15547
15548 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15549     Defining PDUMP
15550 EOF
15551 cat >> confdefs.h <<\EOF
15552 #define PDUMP 1
15553 EOF
15554 }
15555
15556
15557
15558 (
15559 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15560 else
15561   echo "uname -a: `uname -a`"
15562 fi
15563 echo ""
15564 echo "$0 $quoted_arguments"
15565 ) > Installation
15566
15567 if test ! -z ${emacs_beta_version} ; then
15568   if test -z "${emacs_is_beta}" ; then
15569         xemacs_betaname=".${emacs_beta_version}"
15570   else
15571         xemacs_betaname="-b${emacs_beta_version}"
15572   fi
15573 else
15574   xemacs_betaname=""
15575 fi
15576
15577 (
15578 echo "
15579
15580 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15581 "
15582 echo "
15583 Compilation / Installation:"
15584 echo "  Source code location:              $srcdir"
15585 echo "  Installation prefix:               $prefix"
15586 if test -n "$site_includes"; then
15587   echo "  Additional header files:           $site_includes"
15588 fi
15589 if test -n "$site_libraries"; then
15590   echo "  Additional libraries:              $site_libraries"
15591 fi
15592 if test -n "$site_prefixes"; then
15593   echo "  Additional prefixes:               $site_prefixes"
15594 fi
15595 if test -n "$runpath"; then
15596   echo "  Runtime library search path:       $runpath"
15597 fi
15598
15599 if test -n "$opsysfile"
15600 then echo "  Operating system description file: \`$opsysfile'"
15601 else echo "  Not using any operating system description file"
15602 fi
15603 if test -n "$machfile"
15604 then echo "  Machine description file:          \`$machfile'"
15605 else echo "  Not using any machine description file"
15606 fi
15607
15608 echo "  Compiler:                          $CC $CFLAGS"
15609 echo "  Relocating allocator for buffers:  $rel_alloc"
15610 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15611
15612 echo "
15613 Window System:"
15614 if test "$with_msw" = "yes"; then
15615   echo "  Compiling in support for the Microsoft window system."
15616 fi
15617 if test "$with_x11" = "yes"; then
15618   echo "  Compiling in support for the X window system:"
15619   echo "    - X Windows headers location:                 $x_includes"
15620   echo "    - X Windows libraries location:               $x_libraries"
15621   if test "$with_xauth" != yes; then
15622     echo "    - Xau (X authority) not available."
15623   fi
15624   if test "$with_xmu" != yes; then
15625     echo "    - Xmu library not available; substituting equivalent routines."
15626   fi
15627   if test "$with_wmcommand" != no; then
15628     echo "    - Handling WM_COMMAND properly."
15629   fi
15630 fi
15631 if test "$need_athena" = "yes"; then
15632   echo "  Compiling in support for the Athena widget set:"
15633   echo "    - Athena headers location:                    $athena_h_path"
15634   echo "    - Athena library to link:                     $athena_lib"
15635 fi
15636 case "$with_menubars" in
15637   gtk   ) echo "  Using GTK menubars."   ;;
15638   lucid ) echo "  Using Lucid menubars." ;;
15639   motif ) echo "  Using Motif menubars."
15640           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15641           echo "             We recommend using the Lucid menubar instead."
15642           echo "             Re-run configure with --with-menubars='lucid'." ;;
15643     msw ) echo "  Using MS-Windows menubars." ;;
15644 esac
15645 case "$with_scrollbars" in
15646   gtk    ) echo "  Using GTK scrollbars."        ;;
15647   lucid  ) echo "  Using Lucid scrollbars."      ;;
15648   motif  ) echo "  Using Motif scrollbars."      ;;
15649   athena ) echo "  Using Athena scrollbars."     ;;
15650      msw ) echo "  Using MS-Windows scrollbars." ;;
15651 esac
15652 case "$with_dialogs" in
15653   gtk    ) echo "  Using GTK dialog boxes." ;;
15654   motif  ) echo "  Using Motif dialog boxes."
15655            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15656              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15657              echo "             We recommend using the Athena dialog boxes instead."
15658              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15659              echo "             Read the PROBLEMS file for more information."
15660            fi; fi ;;
15661   athena ) echo "  Using Athena dialog boxes."     ;;
15662      msw ) echo "  Using MS-Windows dialog boxes." ;;
15663 esac
15664 case "$with_widgets" in
15665   gtk    ) echo "  Using GTK native widgets."        ;;
15666   motif  ) echo "  Using Motif native widgets."      ;;
15667   athena ) echo "  Using Athena native widgets."     ;;
15668      msw ) echo "  Using MS-Windows native widgets." ;;
15669 esac
15670 if test "$with_dragndrop" = yes; then
15671   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15672   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15673 fi
15674
15675 echo "
15676 TTY:"
15677 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15678 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15679
15680 echo "
15681 Images:"
15682 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15683 if test "$with_xpm" = yes; then
15684   echo "  Compiling in support for XPM  images."
15685 elif test "$with_x11" = yes; then
15686   echo "  WARNING: -----------------------------------------------------------"
15687   echo "  WARNING: Compiling without XPM image support."
15688   if test "$xpm_problem" != ""; then
15689     echo "  Reason: $xpm_problem"
15690   fi
15691   echo "  WARNING: You should strongly consider installing XPM."
15692   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15693   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15694   echo "  WARNING: -----------------------------------------------------------"
15695 fi
15696 if test "$with_png" = yes; then
15697   echo "  Compiling in support for PNG  images."
15698 elif test "$window_system" != "none"; then
15699   echo "  WARNING: -----------------------------------------------------------"
15700   echo "  WARNING: Compiling without PNG image support."
15701   if test "$png_problem" != ""; then
15702     echo "  Reason: $png_problem"
15703   fi
15704   echo "  WARNING: You should strongly consider installing the PNG libraries."
15705   echo "  WARNING: Otherwise certain images and glyphs may not display."
15706   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15707   echo "  WARNING: -----------------------------------------------------------"
15708 fi
15709 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15710 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15711 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15712
15713 echo "
15714 Sound:"
15715 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15716 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15717 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15718 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15719
15720 echo "
15721 Databases:"
15722 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15723 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15724 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15725 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15726 if test "$with_postgresql" = yes; then
15727   echo "  Compiling in support for PostgreSQL."
15728   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15729   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15730 fi
15731
15732 echo "
15733 Internationalization:"
15734 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15735 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15736 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15737 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15738 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15739 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15740 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15741 if test "$with_wnn" = yes; then
15742   echo "  Compiling in support for the WNN input method on Mule."
15743   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15744 fi
15745 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15746
15747 echo "
15748 Mail:"
15749 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15750 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15751 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15752 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15753
15754 echo "
15755 Other Features:"
15756 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15757 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15758 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15759 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15760 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15761 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15762 test "$pdump" = yes && echo "  Using the new portable dumper."
15763 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15764 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15765 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15766   != "no no no no no no"; then
15767   echo "  WARNING: ---------------------------------------------------------"
15768   echo "  WARNING: Compiling in support for runtime error checking."
15769   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15770   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15771   echo "  WARNING: ---------------------------------------------------------"
15772 fi
15773 echo ""
15774 ) | tee -a Installation
15775 echo ""
15776
15777
15778 # Remove any trailing slashes in these variables.
15779 test -n "$prefix" &&
15780   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15781 test -n "$exec_prefix" &&
15782   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15783
15784
15785 for file in $internal_makefile_list; do
15786   test "$file" = src/Makefile.in && \
15787     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15788   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15789 done
15790 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15791 test "$with_modules" = "yes" && ac_output_files="$ac_output_files lib-src/ellcc.h" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src/ellcc.h\" to \$ac_output_files"; fi
15792
15793 trap '' 1 2 15
15794
15795 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15796
15797 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15798 # Let make expand exec_prefix.
15799 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15800
15801 # Any assignment to VPATH causes Sun make to only execute
15802 # the first set of double-colon rules, so remove it if not needed.
15803 # If there is a colon in the path, we need to keep it.
15804 if test "x$srcdir" = x.; then
15805   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15806 fi
15807
15808 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15809
15810 DEFS=-DHAVE_CONFIG_H
15811
15812 # Without the "./", some shells look in PATH for config.status.
15813 : ${CONFIG_STATUS=./config.status}
15814
15815 echo creating $CONFIG_STATUS
15816 rm -f $CONFIG_STATUS
15817 cat > $CONFIG_STATUS <<EOF
15818 #! /bin/sh
15819 # Generated automatically by configure.
15820 # Run this file to recreate the current configuration.
15821 # This directory was configured as follows,
15822 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15823 #
15824 # $0 $ac_configure_args
15825 #
15826 # Compiler output produced by configure, useful for debugging
15827 # configure, is in ./config.log if it exists.
15828
15829 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15830 for ac_option
15831 do
15832   case "\$ac_option" in
15833   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15834     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15835     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15836   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15837     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15838     exit 0 ;;
15839   -help | --help | --hel | --he | --h)
15840     echo "\$ac_cs_usage"; exit 0 ;;
15841   *) echo "\$ac_cs_usage"; exit 1 ;;
15842   esac
15843 done
15844
15845 ac_given_srcdir=$srcdir
15846 ac_given_INSTALL="$INSTALL"
15847
15848 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15849 EOF
15850 cat >> $CONFIG_STATUS <<EOF
15851
15852 # Protect against being on the right side of a sed subst in config.status.
15853 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15854  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15855 $ac_vpsub
15856 $extrasub
15857 s%@SHELL@%$SHELL%g
15858 s%@CFLAGS@%$CFLAGS%g
15859 s%@CPPFLAGS@%$CPPFLAGS%g
15860 s%@CXXFLAGS@%$CXXFLAGS%g
15861 s%@FFLAGS@%$FFLAGS%g
15862 s%@DEFS@%$DEFS%g
15863 s%@LDFLAGS@%$LDFLAGS%g
15864 s%@LIBS@%$LIBS%g
15865 s%@exec_prefix@%$exec_prefix%g
15866 s%@prefix@%$prefix%g
15867 s%@program_transform_name@%$program_transform_name%g
15868 s%@bindir@%$bindir%g
15869 s%@sbindir@%$sbindir%g
15870 s%@libexecdir@%$libexecdir%g
15871 s%@datadir@%$datadir%g
15872 s%@sysconfdir@%$sysconfdir%g
15873 s%@sharedstatedir@%$sharedstatedir%g
15874 s%@localstatedir@%$localstatedir%g
15875 s%@libdir@%$libdir%g
15876 s%@includedir@%$includedir%g
15877 s%@oldincludedir@%$oldincludedir%g
15878 s%@infodir@%$infodir%g
15879 s%@mandir@%$mandir%g
15880 s%@LN_S@%$LN_S%g
15881 s%@blddir@%$blddir%g
15882 s%@CC@%$CC%g
15883 s%@CPP@%$CPP%g
15884 s%@start_flags@%$start_flags%g
15885 s%@ld_switch_shared@%$ld_switch_shared%g
15886 s%@start_files@%$start_files%g
15887 s%@ld@%$ld%g
15888 s%@lib_gcc@%$lib_gcc%g
15889 s%@RANLIB@%$RANLIB%g
15890 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15891 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15892 s%@INSTALL_DATA@%$INSTALL_DATA%g
15893 s%@YACC@%$YACC%g
15894 s%@SET_MAKE@%$SET_MAKE%g
15895 s%@GTK_CONFIG@%$GTK_CONFIG%g
15896 s%@X_CFLAGS@%$X_CFLAGS%g
15897 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15898 s%@X_LIBS@%$X_LIBS%g
15899 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15900 s%@install_pp@%$install_pp%g
15901 s%@libs_xauth@%$libs_xauth%g
15902 s%@dnd_objs@%$dnd_objs%g
15903 s%@lwlib_objs@%$lwlib_objs%g
15904 s%@ALLOCA@%$ALLOCA%g
15905 s%@have_esd_config@%$have_esd_config%g
15906 s%@dll_ld@%$dll_ld%g
15907 s%@dll_cflags@%$dll_cflags%g
15908 s%@dll_ldflags@%$dll_ldflags%g
15909 s%@dll_post@%$dll_post%g
15910 s%@dll_ldo@%$dll_ldo%g
15911 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15912 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15913 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15914 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15915 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15916 s%@PROGNAME@%$PROGNAME%g
15917 s%@version@%$version%g
15918 s%@configuration@%$configuration%g
15919 s%@canonical@%$canonical%g
15920 s%@inststaticdir@%$inststaticdir%g
15921 s%@instvardir@%$instvardir%g
15922 s%@srcdir@%$srcdir%g
15923 s%@pkgdir@%$pkgdir%g
15924 s%@statedir@%$statedir%g
15925 s%@extra_includes@%$extra_includes%g
15926 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15927 s%@PREFIX@%$PREFIX%g
15928 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15929 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15930 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15931 s%@INFODIR@%$INFODIR%g
15932 s%@infopath@%$infopath%g
15933 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15934 s%@INFOPATH@%$INFOPATH%g
15935 s%@package_path@%$package_path%g
15936 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15937 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15938 s%@lispdir@%$lispdir%g
15939 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15940 s%@LISPDIR@%$LISPDIR%g
15941 s%@moduledir@%$moduledir%g
15942 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15943 s%@MODULEDIR@%$MODULEDIR%g
15944 s%@sitelispdir@%$sitelispdir%g
15945 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15946 s%@SITELISPDIR@%$SITELISPDIR%g
15947 s%@sitemoduledir@%$sitemoduledir%g
15948 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15949 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15950 s%@etcdir@%$etcdir%g
15951 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15952 s%@ETCDIR@%$ETCDIR%g
15953 s%@docdir@%$docdir%g
15954 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15955 s%@DOCDIR@%$DOCDIR%g
15956 s%@archlibdir@%$archlibdir%g
15957 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15958 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15959 s%@bitmapdir@%$bitmapdir%g
15960 s%@extra_objs@%$extra_objs%g
15961 s%@machfile@%$machfile%g
15962 s%@opsysfile@%$opsysfile%g
15963 s%@c_switch_general@%$c_switch_general%g
15964 s%@c_switch_window_system@%$c_switch_window_system%g
15965 s%@c_switch_all@%$c_switch_all%g
15966 s%@ld_switch_general@%$ld_switch_general%g
15967 s%@ld_switch_window_system@%$ld_switch_window_system%g
15968 s%@ld_switch_all@%$ld_switch_all%g
15969 s%@ld_libs_general@%$ld_libs_general%g
15970 s%@ld_libs_window_system@%$ld_libs_window_system%g
15971 s%@ld_libs_all@%$ld_libs_all%g
15972 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15973 s%@native_sound_lib@%$native_sound_lib%g
15974 s%@sound_cflags@%$sound_cflags%g
15975 s%@dynodump_arch@%$dynodump_arch%g
15976 s%@XEMACS_CC@%$XEMACS_CC%g
15977 s%@internal_makefile_list@%$internal_makefile_list%g
15978
15979 CEOF
15980 EOF
15981
15982 cat >> $CONFIG_STATUS <<\EOF
15983
15984 # Split the substitutions into bite-sized pieces for seds with
15985 # small command number limits, like on Digital OSF/1 and HP-UX.
15986 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15987 ac_file=1 # Number of current file.
15988 ac_beg=1 # First line for current file.
15989 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15990 ac_more_lines=:
15991 ac_sed_cmds=""
15992 while $ac_more_lines; do
15993   if test $ac_beg -gt 1; then
15994     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15995   else
15996     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15997   fi
15998   if test ! -s conftest.s$ac_file; then
15999     ac_more_lines=false
16000     rm -f conftest.s$ac_file
16001   else
16002     if test -z "$ac_sed_cmds"; then
16003       ac_sed_cmds="sed -f conftest.s$ac_file"
16004     else
16005       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16006     fi
16007     ac_file=`expr $ac_file + 1`
16008     ac_beg=$ac_end
16009     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16010   fi
16011 done
16012 if test -z "$ac_sed_cmds"; then
16013   ac_sed_cmds=cat
16014 fi
16015 EOF
16016
16017 cat >> $CONFIG_STATUS <<EOF
16018
16019 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16020 EOF
16021 cat >> $CONFIG_STATUS <<\EOF
16022 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16023   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16024   case "$ac_file" in
16025   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16026        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16027   *) ac_file_in="${ac_file}.in" ;;
16028   esac
16029
16030   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16031
16032   # Remove last slash and all that follows it.  Not all systems have dirname.
16033   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16034   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16035     # The file is in a subdirectory.
16036     test ! -d "$ac_dir" && mkdir "$ac_dir"
16037     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16038     # A "../" for each directory in $ac_dir_suffix.
16039     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16040   else
16041     ac_dir_suffix= ac_dots=
16042   fi
16043
16044   case "$ac_given_srcdir" in
16045   .)  srcdir=.
16046       if test -z "$ac_dots"; then top_srcdir=.
16047       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16048   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16049   *) # Relative path.
16050     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16051     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16052   esac
16053
16054   case "$ac_given_INSTALL" in
16055   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16056   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16057   esac
16058
16059   echo creating "$ac_file"
16060   rm -f "$ac_file"
16061   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16062   case "$ac_file" in
16063   *Makefile*) ac_comsub="1i\\
16064 # $configure_input" ;;
16065   *) ac_comsub= ;;
16066   esac
16067
16068   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16069   sed -e "$ac_comsub
16070 s%@configure_input@%$configure_input%g
16071 s%@srcdir@%$srcdir%g
16072 s%@top_srcdir@%$top_srcdir%g
16073 s%@INSTALL@%$INSTALL%g
16074 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16075 fi; done
16076 rm -f conftest.s*
16077
16078 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16079 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16080 #
16081 # ac_d sets the value in "#define NAME VALUE" lines.
16082 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16083 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16084 ac_dC='\3'
16085 ac_dD='%g'
16086 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16087 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16088 ac_uB='\([      ]\)%\1#\2define\3'
16089 ac_uC=' '
16090 ac_uD='\4%g'
16091 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16092 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16093 ac_eB='$%\1#\2define\3'
16094 ac_eC=' '
16095 ac_eD='%g'
16096
16097 if test "${CONFIG_HEADERS+set}" != set; then
16098 EOF
16099 cat >> $CONFIG_STATUS <<EOF
16100   CONFIG_HEADERS="src/config.h lwlib/config.h"
16101 EOF
16102 cat >> $CONFIG_STATUS <<\EOF
16103 fi
16104 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16105   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16106   case "$ac_file" in
16107   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16108        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16109   *) ac_file_in="${ac_file}.in" ;;
16110   esac
16111
16112   echo creating $ac_file
16113
16114   rm -f conftest.frag conftest.in conftest.out
16115   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16116   cat $ac_file_inputs > conftest.in
16117
16118 EOF
16119
16120 # Transform confdefs.h into a sed script conftest.vals that substitutes
16121 # the proper values into config.h.in to produce config.h.  And first:
16122 # Protect against being on the right side of a sed subst in config.status.
16123 # Protect against being in an unquoted here document in config.status.
16124 rm -f conftest.vals
16125 cat > conftest.hdr <<\EOF
16126 s/[\\&%]/\\&/g
16127 s%[\\$`]%\\&%g
16128 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16129 s%ac_d%ac_u%gp
16130 s%ac_u%ac_e%gp
16131 EOF
16132 sed -n -f conftest.hdr confdefs.h > conftest.vals
16133 rm -f conftest.hdr
16134
16135 # This sed command replaces #undef with comments.  This is necessary, for
16136 # example, in the case of _POSIX_SOURCE, which is predefined and required
16137 # on some systems where configure will not decide to define it.
16138 cat >> conftest.vals <<\EOF
16139 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16140 EOF
16141
16142 # Break up conftest.vals because some shells have a limit on
16143 # the size of here documents, and old seds have small limits too.
16144
16145 rm -f conftest.tail
16146 while :
16147 do
16148   ac_lines=`grep -c . conftest.vals`
16149   # grep -c gives empty output for an empty file on some AIX systems.
16150   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16151   # Write a limited-size here document to conftest.frag.
16152   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16153   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16154   echo 'CEOF
16155   sed -f conftest.frag conftest.in > conftest.out
16156   rm -f conftest.in
16157   mv conftest.out conftest.in
16158 ' >> $CONFIG_STATUS
16159   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16160   rm -f conftest.vals
16161   mv conftest.tail conftest.vals
16162 done
16163 rm -f conftest.vals
16164
16165 cat >> $CONFIG_STATUS <<\EOF
16166   rm -f conftest.frag conftest.h
16167   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16168   cat conftest.in >> conftest.h
16169   rm -f conftest.in
16170   if cmp -s $ac_file conftest.h 2>/dev/null; then
16171     echo "$ac_file is unchanged"
16172     rm -f conftest.h
16173   else
16174     # Remove last slash and all that follows it.  Not all systems have dirname.
16175       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16176       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16177       # The file is in a subdirectory.
16178       test ! -d "$ac_dir" && mkdir "$ac_dir"
16179     fi
16180     rm -f $ac_file
16181     mv conftest.h $ac_file
16182   fi
16183 fi; done
16184
16185 EOF
16186 cat >> $CONFIG_STATUS <<EOF
16187 CPP="$CPP"
16188  top_srcdir="$srcdir"
16189  MAKE_SUBDIR="$MAKE_SUBDIR"
16190
16191 EOF
16192 cat >> $CONFIG_STATUS <<\EOF
16193 for dir in . $MAKE_SUBDIR; do
16194   (
16195     cd $dir
16196     rm -f junk.c
16197     < Makefile.in \
16198       sed -e '/^# Generated/d' \
16199           -e 's%/\*\*/#.*%%' \
16200           -e 's/^ *# */#/' \
16201           -e '/^##/d' \
16202           -e '/^#/ {
16203 p
16204 d
16205 }'        \
16206           -e '/./ {
16207 s/\([\"]\)/\\\1/g
16208 s/^/"/
16209 s/$/"/
16210 }'  > junk.c;
16211
16212
16213
16214     echo creating $dir/Makefile
16215 $CPP -I. -I${top_srcdir}/src  junk.c \
16216   | sed -e 's/^\#.*//'          \
16217         -e 's/^[        ][      ]*$//'\
16218         -e 's/^ /       /'              \
16219         -e '/^[ \f]*$/d' \
16220         -e '/^\"/ {
16221         s/\\\([\"]\)/\1/g
16222         s/^[    ]*\"//
16223         s/\"[   ]*$//
16224 }' > Makefile.new
16225     chmod 444 Makefile.new
16226     mv -f Makefile.new Makefile
16227
16228     echo creating $dir/GNUmakefile
16229 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16230   | sed -e 's/^\#.*//'          \
16231         -e 's/^[        ][      ]*$//'\
16232         -e 's/^ /       /'              \
16233         -e '/^[ \f]*$/d' \
16234         -e '/^\"/ {
16235         s/\\\([\"]\)/\1/g
16236         s/^[    ]*\"//
16237         s/\"[   ]*$//
16238 }' > Makefile.new
16239     chmod 444 Makefile.new
16240     mv -f Makefile.new GNUmakefile
16241
16242     rm -f junk.c
16243   )
16244 done
16245
16246 sed < config.status >> lib-src/config.values \
16247   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16248   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16249   -e 's/^\([^ ]*\) $/\1 ""/' \
16250   -e 's/ 1$/ t/'
16251
16252
16253 exit 0
16254 EOF
16255 chmod +x $CONFIG_STATUS
16256 rm -fr confdefs* $ac_clean_files
16257 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1