XEmacs 21.4.1 "Copyleft".
[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         CFLAGS="$CFLAGS -Wsign-compare"
2762             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2763               elif test "$__SUNPRO_C" = "yes"; then
2764     case "$opsys" in
2765       sol2    ) CFLAGS="-v -xO4" ;;
2766       sunos4* ) CFLAGS="-xO2";;
2767     esac
2768   elif test "$__DECC" = "yes"; then
2769     CFLAGS="-O3"
2770   elif test "$CC" = "xlc"; then
2771     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2772     else
2773     CFLAGS="-O" ;  fi
2774 fi
2775
2776 if test "$GCC" = "yes"; then
2777 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2778 echo "configure:2779: checking for buggy gcc versions" >&5
2779 GCC_VERSION=`$CC --version`
2780 case `uname -s`:`uname -m`:$GCC_VERSION in
2781                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2782                         case "$CFLAGS" in
2783             *-O2*|*-O3*)
2784                 case "$CFLAGS" in
2785                     *-fno-schedule-insns*) ;;
2786                     *)
2787                         echo "$ac_t""yes" 1>&6
2788                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2789                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2790                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2791                         ;;
2792                 esac
2793                 ;;
2794         esac
2795         ;;
2796                     Linux:alpha:egcs-2.91.*)
2797         echo "$ac_t""yes" 1>&6
2798         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2799         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2800         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2801         ;;
2802     *:i*86*:2.7.2*)
2803         case "$CFLAGS" in
2804             *-O2*|*-O3*)
2805                 case "$GCC_VERSION" in
2806                     2.7.2)
2807                         case "$CFLAGS" in
2808                             *-fno-strength-reduce*) ;;
2809                             *)
2810                                 echo "$ac_t""yes" 1>&6
2811                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2812                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2813                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2814                                 ;;
2815                         esac
2816                         ;;
2817                 esac
2818                 case "$CFLAGS" in
2819                  *-fno-caller-saves*) ;;
2820                  *)
2821                     echo "$ac_t""yes" 1>&6
2822                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2823                     echo "configure: warning: -fno-caller-saves." 1>&2
2824                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2825                     ;;
2826                 esac
2827                 ;;
2828         esac
2829         ;;
2830 esac
2831 echo "$ac_t""no" 1>&6
2832 fi
2833
2834
2835 if test "$GCC" = "yes"; then
2836   set x $ld_switch_system; shift; ld_switch_system=""
2837   while test -n "$1"; do
2838     case $1 in
2839       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2840       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2841       -Xlinker* ) ;;
2842       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2843     esac
2844     shift
2845   done
2846 fi
2847
2848 if test "$GCC" = "yes"; then
2849   set x $ld_switch_machine; shift; ld_switch_machine=""
2850   while test -n "$1"; do
2851     case $1 in
2852       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2853       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2854       -Xlinker* ) ;;
2855       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2856     esac
2857     shift
2858   done
2859 fi
2860
2861 if test "$GCC" = "yes"; then
2862   set x $LDFLAGS; shift; LDFLAGS=""
2863   while test -n "$1"; do
2864     case $1 in
2865       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2866       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2867       -Xlinker* ) ;;
2868       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2869     esac
2870     shift
2871   done
2872 fi
2873
2874 if test "$GCC" = "yes"; then
2875   set x $ld_call_shared; shift; ld_call_shared=""
2876   while test -n "$1"; do
2877     case $1 in
2878       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2879       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2880       -Xlinker* ) ;;
2881       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2882     esac
2883     shift
2884   done
2885 fi
2886
2887 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2888    echo "    xemacs will be linked with \"$objects_machine\""
2889  fi
2890 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"$objects_system\""
2892  fi
2893 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2894    echo "    xemacs will be linked with \"$unexec\""
2895  fi
2896 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"dumper.o\""
2898  fi
2899
2900 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2901 echo "configure:2902: checking for dynodump" >&5
2902 if test "$unexec" != "unexsol2.o"; then
2903   echo "$ac_t""no" 1>&6
2904 else
2905   echo "$ac_t""yes" 1>&6
2906   { test "$extra_verbose" = "yes" && cat << \EOF
2907     Defining DYNODUMP
2908 EOF
2909 cat >> confdefs.h <<\EOF
2910 #define DYNODUMP 1
2911 EOF
2912 }
2913
2914   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2915   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2916   case "$machine" in
2917     sparc   ) dynodump_arch=sparc ;;
2918     *86*    ) dynodump_arch=i386  ;;
2919     powerpc ) dynodump_arch=ppc   ;;
2920   esac
2921     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
2922 fi
2923
2924
2925 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2926
2927 if test "$unexec" = "unexaix.o"; then
2928   if   test "$dynamic" = "no"; then
2929   start_flags="-Wl,-bnso,-bnodelcsect"
2930   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2931   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2932     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2933   done
2934   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2935     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2936   done
2937   
2938 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2939 echo "configure:2940: checking for terminateAndUnload in -lC" >&5
2940 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2941
2942 xe_check_libs=" -lC "
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 /* Override any gcc2 internal prototype to avoid an error.  */
2947 /* We use char because int might match the return type of a gcc2
2948     builtin and then its argument prototype would still apply.  */
2949 char terminateAndUnload();
2950
2951 int main() {
2952 terminateAndUnload()
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956   rm -rf conftest*
2957   eval "ac_cv_lib_$ac_lib_var=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=no"
2963 fi
2964 rm -f conftest*
2965 xe_check_libs=""
2966
2967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2968   echo "$ac_t""yes" 1>&6
2969   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973
2974
2975   fi
2976 elif test -n "$ld_text_start_addr"; then
2977   start_flags="-T $ld_text_start_addr -e __start"
2978 fi
2979
2980
2981
2982
2983 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2984  test -z "$linker" &&  linker='$(CC) -nostdlib'
2985  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2986 fi
2987 test "$GCC" != "yes" && lib_gcc=
2988
2989
2990
2991
2992
2993 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2994 if test -n "$site_libraries"; then
2995   for arg in $site_libraries; do
2996     case "$arg" in
2997      -* ) ;;
2998      * ) test -d "$arg" || \
2999            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3000        arg="-L${arg}" ;;
3001     esac
3002     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3003   done
3004 fi
3005
3006 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3007 if test -n "$site_includes"; then
3008   for arg in $site_includes; do
3009     case "$arg" in
3010       -* ) ;;
3011       * ) test -d "$arg" || \
3012            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3013       arg="-I${arg}" ;;
3014     esac
3015     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3016   done
3017 fi
3018
3019 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3020 if test -n "$site_prefixes"; then
3021   for dir in $site_prefixes; do
3022     lib_dir="${dir}/lib"
3023     inc_dir="${dir}/include"
3024     if test ! -d "$dir"; then
3025       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3026     elif test ! -d "$lib_dir"; then
3027       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3028     else
3029       if test -d "$inc_dir"; then
3030         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
3031       fi
3032       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
3033     fi
3034   done
3035 fi
3036
3037
3038 for dir in "/usr/ccs/lib"; do
3039   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
3040 done
3041
3042 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3043 if test -n "$site_runtime_libraries"; then
3044   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3045   export LD_RUN_PATH
3046 fi
3047
3048
3049
3050
3051
3052 if test -n "$add_runtime_path"; then :;
3053 elif test "$dynamic" = "no"; then add_runtime_path=no
3054 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3055 else case "$opsys" in
3056        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3057        * ) add_runtime_path=no ;;
3058      esac
3059 fi
3060
3061 if test "$add_runtime_path" = "yes"; then
3062       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3063 echo "configure:3064: checking "for runtime libraries flag"" >&5
3064   case "$opsys" in
3065     sol2 ) dash_r="-R" ;;
3066     decosf* | linux* | irix*) dash_r="-rpath " ;;
3067     *)
3068       dash_r=""
3069       for try_dash_r in "-R" "-R " "-rpath "; do
3070         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3071         
3072 if test "$GCC" = "yes"; then
3073   set x $xe_check_libs; shift; xe_check_libs=""
3074   while test -n "$1"; do
3075     case $1 in
3076       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3077       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3078       -Xlinker* ) ;;
3079       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3080     esac
3081     shift
3082   done
3083 fi
3084         cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087
3088 int main() {
3089
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3093   rm -rf conftest*
3094   dash_r="$try_dash_r"
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098 fi
3099 rm -f conftest*
3100         xe_check_libs=""
3101         test -n "$dash_r" && break
3102       done ;;
3103   esac
3104   if test -n "$dash_r";
3105     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3106     else echo "$ac_t""NONE" 1>&6
3107   fi
3108 fi
3109
3110 xe_add_unique_runpath_dir='
3111   xe_add_p=yes
3112   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3113   done
3114   if test "$xe_add_p" = "yes"; then
3115     test -n "$runpath" && runpath="${runpath}:"
3116     runpath="${runpath}${xe_runpath_dir}"
3117     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3118   fi'
3119
3120
3121
3122
3123 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3124     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3125   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3126   
3127         runpath="" runpath_dirs=""
3128   if test -n "$LD_RUN_PATH"; then
3129     runpath="$LD_RUN_PATH"
3130   elif test "$GCC" = "yes"; then
3131         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3132     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3133     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3134     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3135       case "$arg" in P,* | -L* | -R* )
3136         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3137           {
3138 xe_runpath_dir="$dir"
3139   test "$xe_runpath_dir" != "/lib"     -a \
3140         "$xe_runpath_dir" != "/usr/lib" -a \
3141         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3142   eval "$xe_add_unique_runpath_dir"
3143 }
3144         done ;;
3145       esac
3146     done
3147     ld_switch_run="$ld_switch_run_save"
3148     rm -f conftest*
3149   else
3150         for arg in $ld_switch_site $ld_switch_x_site; do
3151       case "$arg" in -L*) {
3152 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3153   test "$xe_runpath_dir" != "/lib"     -a \
3154         "$xe_runpath_dir" != "/usr/lib" -a \
3155         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3156   eval "$xe_add_unique_runpath_dir"
3157 };; esac
3158     done
3159         if test "$opsys $need_motif" = "sol2 yes"; then
3160       xe_runpath_dir="/opt/SUNWdt/lib";
3161       eval "$xe_add_unique_runpath_dir";
3162     fi
3163   fi 
3164   if test -n "$runpath"; then
3165     ld_switch_run="${dash_r}${runpath}"
3166     
3167 if test "$GCC" = "yes"; then
3168   set x $ld_switch_run; shift; ld_switch_run=""
3169   while test -n "$1"; do
3170     case $1 in
3171       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3172       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3173       -Xlinker* ) ;;
3174       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3175     esac
3176     shift
3177   done
3178 fi
3179     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3180   fi
3181 fi
3182
3183
3184
3185 GNU_MALLOC=yes
3186 if test "$with_dlmalloc" != "no"; then
3187         doug_lea_malloc=yes
3188 else
3189         doug_lea_malloc=no
3190 fi
3191 after_morecore_hook_exists=yes
3192 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3193 echo "configure:3194: checking for malloc_set_state" >&5
3194
3195 cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 /* System header to define __stub macros and hopefully few prototypes,
3199     which can conflict with char malloc_set_state(); below.  */
3200 #include <assert.h>
3201 /* Override any gcc2 internal prototype to avoid an error.  */
3202 /* We use char because int might match the return type of a gcc2
3203     builtin and then its argument prototype would still apply.  */
3204 char malloc_set_state();
3205
3206 int main() {
3207
3208 /* The GNU C library defines this for functions which it implements
3209     to always fail with ENOSYS.  Some functions are actually named
3210     something starting with __ and the normal name is an alias.  */
3211 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3212 choke me
3213 #else
3214 malloc_set_state();
3215 #endif
3216
3217 ; return 0; }
3218 EOF
3219 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220   rm -rf conftest*
3221   eval "ac_cv_func_malloc_set_state=yes"
3222 else
3223   echo "configure: failed program was:" >&5
3224   cat conftest.$ac_ext >&5
3225   rm -rf conftest*
3226   eval "ac_cv_func_malloc_set_state=no"
3227 fi
3228 rm -f conftest*
3229
3230 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3231   echo "$ac_t""yes" 1>&6
3232   :
3233 else
3234   echo "$ac_t""no" 1>&6
3235 doug_lea_malloc=no
3236 fi
3237
3238 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3239 echo "configure:3240: checking whether __after_morecore_hook exists" >&5
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 extern void (* __after_morecore_hook)();
3244 int main() {
3245 __after_morecore_hook = 0
3246 ; return 0; }
3247 EOF
3248 if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3249   rm -rf conftest*
3250   echo "$ac_t""yes" 1>&6
3251 else
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   echo "$ac_t""no" 1>&6
3256    after_morecore_hook_exists=no
3257 fi
3258 rm -f conftest*
3259 if test "$system_malloc" = "yes" ; then
3260   GNU_MALLOC=no
3261   GNU_MALLOC_reason="
3262     - The GNU allocators don't work with this system configuration."
3263 elif test "$with_system_malloc" = "yes" ; then
3264   GNU_MALLOC=no
3265   GNU_MALLOC_reason="
3266     - User chose not to use GNU allocators."
3267 elif test "$with_debug_malloc" = "yes" ; then
3268   GNU_MALLOC=no
3269   GNU_MALLOC_reason="
3270     - User chose to use Debugging Malloc."
3271 fi
3272
3273 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3274   GNU_MALLOC_reason="
3275     - Using Doug Lea's new malloc from the GNU C Library."
3276   { test "$extra_verbose" = "yes" && cat << \EOF
3277     Defining DOUG_LEA_MALLOC
3278 EOF
3279 cat >> confdefs.h <<\EOF
3280 #define DOUG_LEA_MALLOC 1
3281 EOF
3282 }
3283
3284   if test "$after_morecore_hook_exists" = "no" ; then
3285     GNU_MALLOC_reason="
3286     - Using Doug Lea's new malloc from the Linux C Library."
3287     { test "$extra_verbose" = "yes" && cat << \EOF
3288     Defining _NO_MALLOC_WARNING_
3289 EOF
3290 cat >> confdefs.h <<\EOF
3291 #define _NO_MALLOC_WARNING_ 1
3292 EOF
3293 }
3294
3295   fi
3296 fi
3297
3298
3299
3300
3301 # Extract the first word of "ranlib", so it can be a program name with args.
3302 set dummy ranlib; ac_word=$2
3303 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3304 echo "configure:3305: checking for $ac_word" >&5
3305
3306 if test -n "$RANLIB"; then
3307   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3308 else
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3310   ac_dummy="$PATH"
3311   for ac_dir in $ac_dummy; do
3312     test -z "$ac_dir" && ac_dir=.
3313     if test -f $ac_dir/$ac_word; then
3314       ac_cv_prog_RANLIB="ranlib"
3315       break
3316     fi
3317   done
3318   IFS="$ac_save_ifs"
3319   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3320 fi
3321 RANLIB="$ac_cv_prog_RANLIB"
3322 if test -n "$RANLIB"; then
3323   echo "$ac_t""$RANLIB" 1>&6
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328 ac_aux_dir=
3329 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3330   if test -f $ac_dir/install-sh; then
3331     ac_aux_dir=$ac_dir
3332     ac_install_sh="$ac_aux_dir/install-sh -c"
3333     break
3334   elif test -f $ac_dir/install.sh; then
3335     ac_aux_dir=$ac_dir
3336     ac_install_sh="$ac_aux_dir/install.sh -c"
3337     break
3338   fi
3339 done
3340 if test -z "$ac_aux_dir"; then
3341   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3342 fi
3343 ac_config_guess=$ac_aux_dir/config.guess
3344 ac_config_sub=$ac_aux_dir/config.sub
3345 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3346
3347 # Find a good install program.  We prefer a C program (faster),
3348 # so one script is as good as another.  But avoid the broken or
3349 # incompatible versions:
3350 # SysV /etc/install, /usr/sbin/install
3351 # SunOS /usr/etc/install
3352 # IRIX /sbin/install
3353 # AIX /bin/install
3354 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3355 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3356 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3357 # ./install, which can be erroneously created by make from ./install.sh.
3358 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3359 echo "configure:3360: checking for a BSD compatible install" >&5
3360 if test -z "$INSTALL"; then
3361
3362   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3363   for ac_dir in $PATH; do
3364     # Account for people who put trailing slashes in PATH elements.
3365     case "$ac_dir/" in
3366     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3367     *)
3368       # OSF1 and SCO ODT 3.0 have their own names for install.
3369       # Don't use installbsd from OSF since it installs stuff as root
3370       # by default.
3371       for ac_prog in ginstall scoinst install; do
3372         if test -f $ac_dir/$ac_prog; then
3373           if test $ac_prog = install &&
3374             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3375             # AIX install.  It has an incompatible calling convention.
3376             :
3377           else
3378             ac_cv_path_install="$ac_dir/$ac_prog -c"
3379             break 2
3380           fi
3381         fi
3382       done
3383       ;;
3384     esac
3385   done
3386   IFS="$ac_save_IFS"
3387
3388   if test "${ac_cv_path_install+set}" = set; then
3389     INSTALL="$ac_cv_path_install"
3390   else
3391     # As a last resort, use the slow shell script.  We don't cache a
3392     # path for INSTALL within a source directory, because that will
3393     # break other packages using the cache if that directory is
3394     # removed, or if the path is relative.
3395     INSTALL="$ac_install_sh"
3396   fi
3397 fi
3398 echo "$ac_t""$INSTALL" 1>&6
3399
3400 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3401 # It thinks the first close brace ends the variable substitution.
3402 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3403
3404 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3405
3406 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3407
3408 for ac_prog in 'bison -y' byacc
3409 do
3410 # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3413 echo "configure:3414: checking for $ac_word" >&5
3414
3415 if test -n "$YACC"; then
3416   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3417 else
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3419   ac_dummy="$PATH"
3420   for ac_dir in $ac_dummy; do
3421     test -z "$ac_dir" && ac_dir=.
3422     if test -f $ac_dir/$ac_word; then
3423       ac_cv_prog_YACC="$ac_prog"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428 fi
3429 YACC="$ac_cv_prog_YACC"
3430 if test -n "$YACC"; then
3431   echo "$ac_t""$YACC" 1>&6
3432 else
3433   echo "$ac_t""no" 1>&6
3434 fi
3435
3436 test -n "$YACC" && break
3437 done
3438 test -n "$YACC" || YACC="yacc"
3439
3440
3441 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 
3442 do
3443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_hdr" >&5
3446
3447 cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 #include <$ac_hdr>
3451 EOF
3452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3453 { (eval echo configure:3454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3455 if test -z "$ac_err"; then
3456   rm -rf conftest*
3457   eval "ac_cv_header_$ac_safe=yes"
3458 else
3459   echo "$ac_err" >&5
3460   echo "configure: failed program was:" >&5
3461   cat conftest.$ac_ext >&5
3462   rm -rf conftest*
3463   eval "ac_cv_header_$ac_safe=no"
3464 fi
3465 rm -f conftest*
3466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3467   echo "$ac_t""yes" 1>&6
3468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3469   { test "$extra_verbose" = "yes" && cat << EOF
3470     Defining $ac_tr_hdr
3471 EOF
3472 cat >> confdefs.h <<EOF
3473 #define $ac_tr_hdr 1
3474 EOF
3475 }
3476  
3477 else
3478   echo "$ac_t""no" 1>&6
3479 fi
3480 done
3481
3482 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3483 echo "configure:3484: checking for sys/wait.h that is POSIX.1 compatible" >&5
3484
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 #include <sys/types.h>
3489 #include <sys/wait.h>
3490 #ifndef WEXITSTATUS
3491 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3492 #endif
3493 #ifndef WIFEXITED
3494 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3495 #endif
3496 int main() {
3497 int s;
3498 wait (&s);
3499 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3503   rm -rf conftest*
3504   ac_cv_header_sys_wait_h=yes
3505 else
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   ac_cv_header_sys_wait_h=no
3510 fi
3511 rm -f conftest*
3512
3513 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3514 if test $ac_cv_header_sys_wait_h = yes; then
3515   { test "$extra_verbose" = "yes" && cat << \EOF
3516     Defining HAVE_SYS_WAIT_H
3517 EOF
3518 cat >> confdefs.h <<\EOF
3519 #define HAVE_SYS_WAIT_H 1
3520 EOF
3521 }
3522
3523 fi
3524
3525 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3526 echo "configure:3527: checking for ANSI C header files" >&5
3527
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <stdlib.h>
3532 #include <stdarg.h>
3533 #include <string.h>
3534 #include <float.h>
3535 EOF
3536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3537 { (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3539 if test -z "$ac_err"; then
3540   rm -rf conftest*
3541   ac_cv_header_stdc=yes
3542 else
3543   echo "$ac_err" >&5
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_header_stdc=no
3548 fi
3549 rm -f conftest*
3550
3551 if test $ac_cv_header_stdc = yes; then
3552   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3553 cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556 #include <string.h>
3557 EOF
3558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3559   egrep "memchr" >/dev/null 2>&1; then
3560   :
3561 else
3562   rm -rf conftest*
3563   ac_cv_header_stdc=no
3564 fi
3565 rm -f conftest*
3566
3567 fi
3568
3569 if test $ac_cv_header_stdc = yes; then
3570   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574 #include <stdlib.h>
3575 EOF
3576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3577   egrep "free" >/dev/null 2>&1; then
3578   :
3579 else
3580   rm -rf conftest*
3581   ac_cv_header_stdc=no
3582 fi
3583 rm -f conftest*
3584
3585 fi
3586
3587 if test $ac_cv_header_stdc = yes; then
3588   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3589 cat > conftest.$ac_ext <<EOF
3590 #line 3591 "configure"
3591 #include "confdefs.h"
3592 #include <ctype.h>
3593 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3594 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3595 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3596 int main () { int i; for (i = 0; i < 256; i++)
3597 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3598 exit (0); }
3599
3600 EOF
3601 if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3602 then
3603   :
3604 else
3605   conftest_rc="$?"
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -fr conftest*
3609   ac_cv_header_stdc=no
3610 fi
3611 rm -fr conftest*
3612 fi
3613
3614 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3615 if test $ac_cv_header_stdc = yes; then
3616   { test "$extra_verbose" = "yes" && cat << \EOF
3617     Defining STDC_HEADERS
3618 EOF
3619 cat >> confdefs.h <<\EOF
3620 #define STDC_HEADERS 1
3621 EOF
3622 }
3623
3624 fi
3625
3626 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3627 echo "configure:3628: checking whether time.h and sys/time.h may both be included" >&5
3628
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #include <sys/types.h>
3633 #include <sys/time.h>
3634 #include <time.h>
3635 int main() {
3636 struct tm *tp;
3637 ; return 0; }
3638 EOF
3639 if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3640   rm -rf conftest*
3641   ac_cv_header_time=yes
3642 else
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   ac_cv_header_time=no
3647 fi
3648 rm -f conftest*
3649
3650 echo "$ac_t""$ac_cv_header_time" 1>&6
3651 if test $ac_cv_header_time = yes; then
3652   { test "$extra_verbose" = "yes" && cat << \EOF
3653     Defining TIME_WITH_SYS_TIME
3654 EOF
3655 cat >> confdefs.h <<\EOF
3656 #define TIME_WITH_SYS_TIME 1
3657 EOF
3658 }
3659
3660 fi
3661
3662 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3663 echo "configure:3664: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3664
3665 cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 #include <sys/types.h>
3669 #include <signal.h>
3670 /* NetBSD declares sys_siglist in unistd.h.  */
3671 #ifdef HAVE_UNISTD_H
3672 #include <unistd.h>
3673 #endif
3674 int main() {
3675 char *msg = *(sys_siglist + 1);
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3679   rm -rf conftest*
3680   ac_cv_decl_sys_siglist=yes
3681 else
3682   echo "configure: failed program was:" >&5
3683   cat conftest.$ac_ext >&5
3684   rm -rf conftest*
3685   ac_cv_decl_sys_siglist=no
3686 fi
3687 rm -f conftest*
3688
3689 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3690 if test $ac_cv_decl_sys_siglist = yes; then
3691   { test "$extra_verbose" = "yes" && cat << \EOF
3692     Defining SYS_SIGLIST_DECLARED
3693 EOF
3694 cat >> confdefs.h <<\EOF
3695 #define SYS_SIGLIST_DECLARED 1
3696 EOF
3697 }
3698
3699 fi
3700
3701
3702
3703 echo $ac_n "checking for utime""... $ac_c" 1>&6
3704 echo "configure:3705: checking for utime" >&5
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <sys/types.h>
3709 #include <utime.h>
3710 int main() {
3711 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715   rm -rf conftest*
3716   echo "$ac_t""yes" 1>&6
3717    { test "$extra_verbose" = "yes" && cat << \EOF
3718     Defining HAVE_UTIME
3719 EOF
3720 cat >> confdefs.h <<\EOF
3721 #define HAVE_UTIME 1
3722 EOF
3723 }
3724
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728   rm -rf conftest*
3729   echo "$ac_t""no" 1>&6
3730       for ac_func in utimes
3731 do
3732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3733 echo "configure:3734: checking for $ac_func" >&5
3734
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 /* System header to define __stub macros and hopefully few prototypes,
3739     which can conflict with char $ac_func(); below.  */
3740 #include <assert.h>
3741 /* Override any gcc2 internal prototype to avoid an error.  */
3742 /* We use char because int might match the return type of a gcc2
3743     builtin and then its argument prototype would still apply.  */
3744 char $ac_func();
3745
3746 int main() {
3747
3748 /* The GNU C library defines this for functions which it implements
3749     to always fail with ENOSYS.  Some functions are actually named
3750     something starting with __ and the normal name is an alias.  */
3751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3752 choke me
3753 #else
3754 $ac_func();
3755 #endif
3756
3757 ; return 0; }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3760   rm -rf conftest*
3761   eval "ac_cv_func_$ac_func=yes"
3762 else
3763   echo "configure: failed program was:" >&5
3764   cat conftest.$ac_ext >&5
3765   rm -rf conftest*
3766   eval "ac_cv_func_$ac_func=no"
3767 fi
3768 rm -f conftest*
3769
3770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3771   echo "$ac_t""yes" 1>&6
3772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3773   { test "$extra_verbose" = "yes" && cat << EOF
3774     Defining $ac_tr_func
3775 EOF
3776 cat >> confdefs.h <<EOF
3777 #define $ac_tr_func 1
3778 EOF
3779 }
3780  
3781 else
3782   echo "$ac_t""no" 1>&6
3783 fi
3784 done
3785
3786 fi
3787 rm -f conftest*
3788
3789
3790 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3791 echo "configure:3792: checking return type of signal handlers" >&5
3792
3793 cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796 #include <sys/types.h>
3797 #include <signal.h>
3798 #ifdef signal
3799 #undef signal
3800 #endif
3801 #ifdef __cplusplus
3802 extern "C" void (*signal (int, void (*)(int)))(int);
3803 #else
3804 void (*signal ()) ();
3805 #endif
3806
3807 int main() {
3808 int i;
3809 ; return 0; }
3810 EOF
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   rm -rf conftest*
3813   ac_cv_type_signal=void
3814 else
3815   echo "configure: failed program was:" >&5
3816   cat conftest.$ac_ext >&5
3817   rm -rf conftest*
3818   ac_cv_type_signal=int
3819 fi
3820 rm -f conftest*
3821
3822 echo "$ac_t""$ac_cv_type_signal" 1>&6
3823 { test "$extra_verbose" = "yes" && cat << EOF
3824     Defining RETSIGTYPE = $ac_cv_type_signal
3825 EOF
3826 cat >> confdefs.h <<EOF
3827 #define RETSIGTYPE $ac_cv_type_signal
3828 EOF
3829 }
3830
3831
3832 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3833 echo "configure:3834: checking for size_t" >&5
3834
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <sys/types.h>
3839 #if STDC_HEADERS
3840 #include <stdlib.h>
3841 #include <stddef.h>
3842 #endif
3843 EOF
3844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3845   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3846   rm -rf conftest*
3847   ac_cv_type_size_t=yes
3848 else
3849   rm -rf conftest*
3850   ac_cv_type_size_t=no
3851 fi
3852 rm -f conftest*
3853
3854 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3855 if test $ac_cv_type_size_t = no; then
3856   { test "$extra_verbose" = "yes" && cat << \EOF
3857     Defining size_t = unsigned
3858 EOF
3859 cat >> confdefs.h <<\EOF
3860 #define size_t unsigned
3861 EOF
3862 }
3863
3864 fi
3865
3866 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3867 echo "configure:3868: checking for pid_t" >&5
3868
3869 cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 #include <sys/types.h>
3873 #if STDC_HEADERS
3874 #include <stdlib.h>
3875 #include <stddef.h>
3876 #endif
3877 EOF
3878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3879   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3880   rm -rf conftest*
3881   ac_cv_type_pid_t=yes
3882 else
3883   rm -rf conftest*
3884   ac_cv_type_pid_t=no
3885 fi
3886 rm -f conftest*
3887
3888 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3889 if test $ac_cv_type_pid_t = no; then
3890   { test "$extra_verbose" = "yes" && cat << \EOF
3891     Defining pid_t = int
3892 EOF
3893 cat >> confdefs.h <<\EOF
3894 #define pid_t int
3895 EOF
3896 }
3897
3898 fi
3899
3900 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3901 echo "configure:3902: checking for uid_t in sys/types.h" >&5
3902
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 #include <sys/types.h>
3907 EOF
3908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3909   egrep "uid_t" >/dev/null 2>&1; then
3910   rm -rf conftest*
3911   ac_cv_type_uid_t=yes
3912 else
3913   rm -rf conftest*
3914   ac_cv_type_uid_t=no
3915 fi
3916 rm -f conftest*
3917
3918
3919 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3920 if test $ac_cv_type_uid_t = no; then
3921   { test "$extra_verbose" = "yes" && cat << \EOF
3922     Defining uid_t = int
3923 EOF
3924 cat >> confdefs.h <<\EOF
3925 #define uid_t int
3926 EOF
3927 }
3928
3929   { test "$extra_verbose" = "yes" && cat << \EOF
3930     Defining gid_t = int
3931 EOF
3932 cat >> confdefs.h <<\EOF
3933 #define gid_t int
3934 EOF
3935 }
3936
3937 fi
3938
3939 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3940 echo "configure:3941: checking for mode_t" >&5
3941
3942 cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945 #include <sys/types.h>
3946 #if STDC_HEADERS
3947 #include <stdlib.h>
3948 #include <stddef.h>
3949 #endif
3950 EOF
3951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3952   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3953   rm -rf conftest*
3954   ac_cv_type_mode_t=yes
3955 else
3956   rm -rf conftest*
3957   ac_cv_type_mode_t=no
3958 fi
3959 rm -f conftest*
3960
3961 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3962 if test $ac_cv_type_mode_t = no; then
3963   { test "$extra_verbose" = "yes" && cat << \EOF
3964     Defining mode_t = int
3965 EOF
3966 cat >> confdefs.h <<\EOF
3967 #define mode_t int
3968 EOF
3969 }
3970
3971 fi
3972
3973 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3974 echo "configure:3975: checking for off_t" >&5
3975
3976 cat > conftest.$ac_ext <<EOF
3977 #line 3978 "configure"
3978 #include "confdefs.h"
3979 #include <sys/types.h>
3980 #if STDC_HEADERS
3981 #include <stdlib.h>
3982 #include <stddef.h>
3983 #endif
3984 EOF
3985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3986   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3987   rm -rf conftest*
3988   ac_cv_type_off_t=yes
3989 else
3990   rm -rf conftest*
3991   ac_cv_type_off_t=no
3992 fi
3993 rm -f conftest*
3994
3995 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3996 if test $ac_cv_type_off_t = no; then
3997   { test "$extra_verbose" = "yes" && cat << \EOF
3998     Defining off_t = long
3999 EOF
4000 cat >> confdefs.h <<\EOF
4001 #define off_t long
4002 EOF
4003 }
4004
4005 fi
4006
4007 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4008 echo "configure:4009: checking for ssize_t" >&5
4009
4010 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/types.h>
4014 #if STDC_HEADERS
4015 #include <stdlib.h>
4016 #include <stddef.h>
4017 #endif
4018 EOF
4019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4020   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4021   rm -rf conftest*
4022   ac_cv_type_ssize_t=yes
4023 else
4024   rm -rf conftest*
4025   ac_cv_type_ssize_t=no
4026 fi
4027 rm -f conftest*
4028
4029 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4030 if test $ac_cv_type_ssize_t = no; then
4031   { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining ssize_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define ssize_t int
4036 EOF
4037 }
4038
4039 fi
4040
4041
4042 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4043 echo "configure:4044: checking for socklen_t" >&5
4044 cat > conftest.$ac_ext <<EOF
4045 #line 4046 "configure"
4046 #include "confdefs.h"
4047 #include <sys/socket.h>
4048 socklen_t x;
4049
4050 int main() {
4051
4052 ; return 0; }
4053 EOF
4054 if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4055   rm -rf conftest*
4056   echo "$ac_t""yes" 1>&6
4057 else
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   
4062 cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <sys/socket.h>
4066 int accept (int, struct sockaddr *, size_t *);
4067
4068 int main() {
4069
4070 ; return 0; }
4071 EOF
4072 if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073   rm -rf conftest*
4074   
4075 echo "$ac_t""size_t" 1>&6
4076 { test "$extra_verbose" = "yes" && cat << \EOF
4077     Defining socklen_t = size_t
4078 EOF
4079 cat >> confdefs.h <<\EOF
4080 #define socklen_t size_t
4081 EOF
4082 }
4083
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   
4089 echo "$ac_t""int" 1>&6
4090 { test "$extra_verbose" = "yes" && cat << \EOF
4091     Defining socklen_t = int
4092 EOF
4093 cat >> confdefs.h <<\EOF
4094 #define socklen_t int
4095 EOF
4096 }
4097
4098 fi
4099 rm -f conftest*
4100 fi
4101 rm -f conftest*
4102
4103 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4104 echo "configure:4105: checking for struct timeval" >&5
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 #ifdef TIME_WITH_SYS_TIME
4109 #include <sys/time.h>
4110 #include <time.h>
4111 #else
4112 #ifdef HAVE_SYS_TIME_H
4113 #include <sys/time.h>
4114 #else
4115 #include <time.h>
4116 #endif
4117 #endif
4118 int main() {
4119 static struct timeval x; x.tv_sec = x.tv_usec;
4120 ; return 0; }
4121 EOF
4122 if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4123   rm -rf conftest*
4124   echo "$ac_t""yes" 1>&6
4125   HAVE_TIMEVAL=yes
4126   { test "$extra_verbose" = "yes" && cat << \EOF
4127     Defining HAVE_TIMEVAL
4128 EOF
4129 cat >> confdefs.h <<\EOF
4130 #define HAVE_TIMEVAL 1
4131 EOF
4132 }
4133
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   echo "$ac_t""no" 1>&6
4139    HAVE_TIMEVAL=no
4140 fi
4141 rm -f conftest*
4142
4143 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4144 echo "configure:4145: checking whether struct tm is in sys/time.h or time.h" >&5
4145
4146 cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #include <sys/types.h>
4150 #include <time.h>
4151 int main() {
4152 struct tm *tp; tp->tm_sec;
4153 ; return 0; }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4156   rm -rf conftest*
4157   ac_cv_struct_tm=time.h
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -rf conftest*
4162   ac_cv_struct_tm=sys/time.h
4163 fi
4164 rm -f conftest*
4165
4166 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4167 if test $ac_cv_struct_tm = sys/time.h; then
4168   { test "$extra_verbose" = "yes" && cat << \EOF
4169     Defining TM_IN_SYS_TIME
4170 EOF
4171 cat >> confdefs.h <<\EOF
4172 #define TM_IN_SYS_TIME 1
4173 EOF
4174 }
4175
4176 fi
4177
4178 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4179 echo "configure:4180: checking for tm_zone in struct tm" >&5
4180
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 #include <sys/types.h>
4185 #include <$ac_cv_struct_tm>
4186 int main() {
4187 struct tm tm; tm.tm_zone;
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4191   rm -rf conftest*
4192   ac_cv_struct_tm_zone=yes
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   ac_cv_struct_tm_zone=no
4198 fi
4199 rm -f conftest*
4200
4201 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4202 if test "$ac_cv_struct_tm_zone" = yes; then
4203   { test "$extra_verbose" = "yes" && cat << \EOF
4204     Defining HAVE_TM_ZONE
4205 EOF
4206 cat >> confdefs.h <<\EOF
4207 #define HAVE_TM_ZONE 1
4208 EOF
4209 }
4210
4211 else
4212   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4213 echo "configure:4214: checking for tzname" >&5
4214
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <time.h>
4219 #ifndef tzname /* For SGI.  */
4220 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4221 #endif
4222 int main() {
4223 atoi(*tzname);
4224 ; return 0; }
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4227   rm -rf conftest*
4228   ac_cv_var_tzname=yes
4229 else
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -rf conftest*
4233   ac_cv_var_tzname=no
4234 fi
4235 rm -f conftest*
4236
4237 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4238   if test $ac_cv_var_tzname = yes; then
4239     { test "$extra_verbose" = "yes" && cat << \EOF
4240     Defining HAVE_TZNAME
4241 EOF
4242 cat >> confdefs.h <<\EOF
4243 #define HAVE_TZNAME 1
4244 EOF
4245 }
4246
4247   fi
4248 fi
4249
4250
4251 echo $ac_n "checking for working const""... $ac_c" 1>&6
4252 echo "configure:4253: checking for working const" >&5
4253
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257
4258 int main() {
4259
4260 /* Ultrix mips cc rejects this.  */
4261 typedef int charset[2]; const charset x = {0,0};
4262 /* SunOS 4.1.1 cc rejects this.  */
4263 char const *const *ccp;
4264 char **p;
4265 /* NEC SVR4.0.2 mips cc rejects this.  */
4266 struct point {int x, y;};
4267 static struct point const zero = {0,0};
4268 /* AIX XL C 1.02.0.0 rejects this.
4269    It does not let you subtract one const X* pointer from another in an arm
4270    of an if-expression whose if-part is not a constant expression */
4271 const char *g = "string";
4272 ccp = &g + (g ? g-g : 0);
4273 /* HPUX 7.0 cc rejects these. */
4274 ++ccp;
4275 p = (char**) ccp;
4276 ccp = (char const *const *) p;
4277 { /* SCO 3.2v4 cc rejects this.  */
4278   char *t;
4279   char const *s = 0 ? (char *) 0 : (char const *) 0;
4280
4281   *t++ = 0;
4282 }
4283 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4284   int x[] = {25, 17};
4285   const int *foo = &x[0];
4286   ++foo;
4287 }
4288 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4289   typedef const int *iptr;
4290   iptr p = 0;
4291   ++p;
4292 }
4293 { /* AIX XL C 1.02.0.0 rejects this saying
4294      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4295   struct s { int j; const int *ap[3]; };
4296   struct s *b; b->j = 5;
4297 }
4298 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4299   const int foo = 10;
4300 }
4301
4302 ; return 0; }
4303 EOF
4304 if { (eval echo configure:4305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4305   rm -rf conftest*
4306   ac_cv_c_const=yes
4307 else
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   ac_cv_c_const=no
4312 fi
4313 rm -f conftest*
4314
4315 echo "$ac_t""$ac_cv_c_const" 1>&6
4316 if test $ac_cv_c_const = no; then
4317   { test "$extra_verbose" = "yes" && cat << \EOF
4318     Defining const = 
4319 EOF
4320 cat >> confdefs.h <<\EOF
4321 #define const 
4322 EOF
4323 }
4324
4325 fi
4326
4327
4328 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4329 echo "configure:4330: checking whether ${MAKE-make} sets \${MAKE}" >&5
4330 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4331
4332 cat > conftestmake <<\EOF
4333 all:
4334         @echo 'ac_maketemp="${MAKE}"'
4335 EOF
4336 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4337 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4338 if test -n "$ac_maketemp"; then
4339   eval ac_cv_prog_make_${ac_make}_set=yes
4340 else
4341   eval ac_cv_prog_make_${ac_make}_set=no
4342 fi
4343 rm -f conftestmake
4344 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4345   echo "$ac_t""yes" 1>&6
4346   SET_MAKE=
4347 else
4348   echo "$ac_t""no" 1>&6
4349   SET_MAKE="MAKE=${MAKE-make}"
4350 fi
4351
4352
4353 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4354 echo "configure:4355: checking whether byte ordering is bigendian" >&5
4355
4356 ac_cv_c_bigendian=unknown
4357 # See if sys/param.h defines the BYTE_ORDER macro.
4358 cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <sys/types.h>
4362 #include <sys/param.h>
4363 int main() {
4364
4365 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4366  bogus endian macros
4367 #endif
4368 ; return 0; }
4369 EOF
4370 if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4371   rm -rf conftest*
4372   # It does; now see whether it defined to BIG_ENDIAN or not.
4373 cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <sys/types.h>
4377 #include <sys/param.h>
4378 int main() {
4379
4380 #if BYTE_ORDER != BIG_ENDIAN
4381  not big endian
4382 #endif
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4386   rm -rf conftest*
4387   ac_cv_c_bigendian=yes
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   ac_cv_c_bigendian=no
4393 fi
4394 rm -f conftest*
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398 fi
4399 rm -f conftest*
4400 if test $ac_cv_c_bigendian = unknown; then
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 main () {
4405   /* Are we little or big endian?  From Harbison&Steele.  */
4406   union
4407   {
4408     long l;
4409     char c[sizeof (long)];
4410   } u;
4411   u.l = 1;
4412   exit (u.c[sizeof (long) - 1] == 1);
4413 }
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4416 then
4417   ac_cv_c_bigendian=no
4418 else
4419   conftest_rc="$?"
4420   echo "configure: failed program was:" >&5
4421   cat conftest.$ac_ext >&5
4422   rm -fr conftest*
4423   ac_cv_c_bigendian=yes
4424 fi
4425 rm -fr conftest*
4426 fi
4427
4428 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4429 if test $ac_cv_c_bigendian = yes; then
4430   { test "$extra_verbose" = "yes" && cat << \EOF
4431     Defining WORDS_BIGENDIAN
4432 EOF
4433 cat >> confdefs.h <<\EOF
4434 #define WORDS_BIGENDIAN 1
4435 EOF
4436 }
4437
4438 fi
4439
4440
4441 echo $ac_n "checking size of short""... $ac_c" 1>&6
4442 echo "configure:4443: checking size of short" >&5
4443
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <stdio.h>
4448 main()
4449 {
4450   FILE *f=fopen("conftestval", "w");
4451   if (!f) exit(1);
4452   fprintf(f, "%d\n", sizeof(short));
4453   exit(0);
4454 }
4455 EOF
4456 if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4457 then
4458   ac_cv_sizeof_short=`cat conftestval`
4459 else
4460   conftest_rc="$?"
4461   echo "configure: failed program was:" >&5
4462   cat conftest.$ac_ext >&5
4463   rm -fr conftest*
4464   ac_cv_sizeof_short=0
4465 fi
4466 rm -fr conftest*
4467 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4468 { test "$extra_verbose" = "yes" && cat << EOF
4469     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4470 EOF
4471 cat >> confdefs.h <<EOF
4472 #define SIZEOF_SHORT $ac_cv_sizeof_short
4473 EOF
4474 }
4475
4476
4477 if test "$ac_cv_sizeof_short" = 0; then
4478   echo ""
4479   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4480   echo "*** PANIC *** Please examine config.log for compilation errors."
4481   exit 1
4482 fi
4483 echo $ac_n "checking size of int""... $ac_c" 1>&6
4484 echo "configure:4485: checking size of int" >&5
4485
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 #include <stdio.h>
4490 main()
4491 {
4492   FILE *f=fopen("conftestval", "w");
4493   if (!f) exit(1);
4494   fprintf(f, "%d\n", sizeof(int));
4495   exit(0);
4496 }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4499 then
4500   ac_cv_sizeof_int=`cat conftestval`
4501 else
4502   conftest_rc="$?"
4503   echo "configure: failed program was:" >&5
4504   cat conftest.$ac_ext >&5
4505   rm -fr conftest*
4506   ac_cv_sizeof_int=0
4507 fi
4508 rm -fr conftest*
4509 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4510 { test "$extra_verbose" = "yes" && cat << EOF
4511     Defining SIZEOF_INT = $ac_cv_sizeof_int
4512 EOF
4513 cat >> confdefs.h <<EOF
4514 #define SIZEOF_INT $ac_cv_sizeof_int
4515 EOF
4516 }
4517
4518
4519 echo $ac_n "checking size of long""... $ac_c" 1>&6
4520 echo "configure:4521: checking size of long" >&5
4521
4522 cat > conftest.$ac_ext <<EOF
4523 #line 4524 "configure"
4524 #include "confdefs.h"
4525 #include <stdio.h>
4526 main()
4527 {
4528   FILE *f=fopen("conftestval", "w");
4529   if (!f) exit(1);
4530   fprintf(f, "%d\n", sizeof(long));
4531   exit(0);
4532 }
4533 EOF
4534 if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4535 then
4536   ac_cv_sizeof_long=`cat conftestval`
4537 else
4538   conftest_rc="$?"
4539   echo "configure: failed program was:" >&5
4540   cat conftest.$ac_ext >&5
4541   rm -fr conftest*
4542   ac_cv_sizeof_long=0
4543 fi
4544 rm -fr conftest*
4545 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4546 { test "$extra_verbose" = "yes" && cat << EOF
4547     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4548 EOF
4549 cat >> confdefs.h <<EOF
4550 #define SIZEOF_LONG $ac_cv_sizeof_long
4551 EOF
4552 }
4553
4554
4555 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4556 echo "configure:4557: checking size of long long" >&5
4557
4558 cat > conftest.$ac_ext <<EOF
4559 #line 4560 "configure"
4560 #include "confdefs.h"
4561 #include <stdio.h>
4562 main()
4563 {
4564   FILE *f=fopen("conftestval", "w");
4565   if (!f) exit(1);
4566   fprintf(f, "%d\n", sizeof(long long));
4567   exit(0);
4568 }
4569 EOF
4570 if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4571 then
4572   ac_cv_sizeof_long_long=`cat conftestval`
4573 else
4574   conftest_rc="$?"
4575   echo "configure: failed program was:" >&5
4576   cat conftest.$ac_ext >&5
4577   rm -fr conftest*
4578   ac_cv_sizeof_long_long=0
4579 fi
4580 rm -fr conftest*
4581 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4582 { test "$extra_verbose" = "yes" && cat << EOF
4583     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4584 EOF
4585 cat >> confdefs.h <<EOF
4586 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4587 EOF
4588 }
4589
4590
4591 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4592 echo "configure:4593: checking size of void *" >&5
4593
4594 cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597 #include <stdio.h>
4598 main()
4599 {
4600   FILE *f=fopen("conftestval", "w");
4601   if (!f) exit(1);
4602   fprintf(f, "%d\n", sizeof(void *));
4603   exit(0);
4604 }
4605 EOF
4606 if { (eval echo configure:4607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4607 then
4608   ac_cv_sizeof_void_p=`cat conftestval`
4609 else
4610   conftest_rc="$?"
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -fr conftest*
4614   ac_cv_sizeof_void_p=0
4615 fi
4616 rm -fr conftest*
4617 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4618 { test "$extra_verbose" = "yes" && cat << EOF
4619     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4620 EOF
4621 cat >> confdefs.h <<EOF
4622 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4623 EOF
4624 }
4625
4626
4627
4628 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4629 echo "configure:4630: checking for long file names" >&5
4630
4631 ac_cv_sys_long_file_names=yes
4632 # Test for long file names in all the places we know might matter:
4633 #      .                the current directory, where building will happen
4634 #      $prefix/lib      where we will be installing things
4635 #      $exec_prefix/lib likewise
4636 # eval it to expand exec_prefix.
4637 #      $TMPDIR          if set, where it might want to write temporary files
4638 # if $TMPDIR is not set:
4639 #      /tmp             where it might want to write temporary files
4640 #      /var/tmp         likewise
4641 #      /usr/tmp         likewise
4642 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4643   ac_tmpdirs="$TMPDIR"
4644 else
4645   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4646 fi
4647 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4648   test -d $ac_dir || continue
4649   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4650   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4651   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4652   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4653   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4654     ac_cv_sys_long_file_names=no
4655     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4656     break
4657   fi
4658   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4659 done
4660
4661 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4662 if test $ac_cv_sys_long_file_names = yes; then
4663   { test "$extra_verbose" = "yes" && cat << \EOF
4664     Defining HAVE_LONG_FILE_NAMES
4665 EOF
4666 cat >> confdefs.h <<\EOF
4667 #define HAVE_LONG_FILE_NAMES 1
4668 EOF
4669 }
4670
4671 fi
4672
4673
4674 echo $ac_n "checking for sin""... $ac_c" 1>&6
4675 echo "configure:4676: checking for sin" >&5
4676
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 /* System header to define __stub macros and hopefully few prototypes,
4681     which can conflict with char sin(); below.  */
4682 #include <assert.h>
4683 /* Override any gcc2 internal prototype to avoid an error.  */
4684 /* We use char because int might match the return type of a gcc2
4685     builtin and then its argument prototype would still apply.  */
4686 char sin();
4687
4688 int main() {
4689
4690 /* The GNU C library defines this for functions which it implements
4691     to always fail with ENOSYS.  Some functions are actually named
4692     something starting with __ and the normal name is an alias.  */
4693 #if defined (__stub_sin) || defined (__stub___sin)
4694 choke me
4695 #else
4696 sin();
4697 #endif
4698
4699 ; return 0; }
4700 EOF
4701 if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4702   rm -rf conftest*
4703   eval "ac_cv_func_sin=yes"
4704 else
4705   echo "configure: failed program was:" >&5
4706   cat conftest.$ac_ext >&5
4707   rm -rf conftest*
4708   eval "ac_cv_func_sin=no"
4709 fi
4710 rm -f conftest*
4711
4712 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4713   echo "$ac_t""yes" 1>&6
4714   :
4715 else
4716   echo "$ac_t""no" 1>&6
4717
4718 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4719 echo "configure:4720: checking for sin in -lm" >&5
4720 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4721
4722 xe_check_libs=" -lm "
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 /* Override any gcc2 internal prototype to avoid an error.  */
4727 /* We use char because int might match the return type of a gcc2
4728     builtin and then its argument prototype would still apply.  */
4729 char sin();
4730
4731 int main() {
4732 sin()
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=yes"
4738 else
4739   echo "configure: failed program was:" >&5
4740   cat conftest.$ac_ext >&5
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=no"
4743 fi
4744 rm -f conftest*
4745 xe_check_libs=""
4746
4747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4748   echo "$ac_t""yes" 1>&6
4749     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4750     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4751   { test "$extra_verbose" = "yes" && cat << EOF
4752     Defining $ac_tr_lib
4753 EOF
4754 cat >> confdefs.h <<EOF
4755 #define $ac_tr_lib 1
4756 EOF
4757 }
4758
4759   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4760
4761 else
4762   echo "$ac_t""no" 1>&6
4763 fi
4764
4765
4766 fi
4767
4768
4769 { test "$extra_verbose" = "yes" && cat << \EOF
4770     Defining LISP_FLOAT_TYPE
4771 EOF
4772 cat >> confdefs.h <<\EOF
4773 #define LISP_FLOAT_TYPE 1
4774 EOF
4775 }
4776
4777
4778 cat > conftest.$ac_ext <<EOF
4779 #line 4780 "configure"
4780 #include "confdefs.h"
4781 #include <math.h>
4782 int main() {
4783 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   { test "$extra_verbose" = "yes" && cat << \EOF
4789     Defining HAVE_INVERSE_HYPERBOLIC
4790 EOF
4791 cat >> confdefs.h <<\EOF
4792 #define HAVE_INVERSE_HYPERBOLIC 1
4793 EOF
4794 }
4795
4796 else
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799 fi
4800 rm -f conftest*
4801
4802 echo "checking type of mail spool file locking" 1>&6
4803 echo "configure:4804: checking type of mail spool file locking" >&5
4804 for ac_func in lockf flock
4805 do
4806 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4807 echo "configure:4808: checking for $ac_func" >&5
4808
4809 cat > conftest.$ac_ext <<EOF
4810 #line 4811 "configure"
4811 #include "confdefs.h"
4812 /* System header to define __stub macros and hopefully few prototypes,
4813     which can conflict with char $ac_func(); below.  */
4814 #include <assert.h>
4815 /* Override any gcc2 internal prototype to avoid an error.  */
4816 /* We use char because int might match the return type of a gcc2
4817     builtin and then its argument prototype would still apply.  */
4818 char $ac_func();
4819
4820 int main() {
4821
4822 /* The GNU C library defines this for functions which it implements
4823     to always fail with ENOSYS.  Some functions are actually named
4824     something starting with __ and the normal name is an alias.  */
4825 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4826 choke me
4827 #else
4828 $ac_func();
4829 #endif
4830
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_func_$ac_func=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_func_$ac_func=no"
4841 fi
4842 rm -f conftest*
4843
4844 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4845   echo "$ac_t""yes" 1>&6
4846     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4847   { test "$extra_verbose" = "yes" && cat << EOF
4848     Defining $ac_tr_func
4849 EOF
4850 cat >> confdefs.h <<EOF
4851 #define $ac_tr_func 1
4852 EOF
4853 }
4854  
4855 else
4856   echo "$ac_t""no" 1>&6
4857 fi
4858 done
4859
4860 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4861 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4862 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4863 if   test -z "$mail_locking"; then
4864   case "$opsys" in cygwin* | mingw*)
4865     mail_locking=pop ;;
4866   esac
4867 fi
4868
4869 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4870     Defining MAIL_LOCK_LOCKF
4871 EOF
4872 cat >> confdefs.h <<\EOF
4873 #define MAIL_LOCK_LOCKF 1
4874 EOF
4875 }
4876
4877 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4878     Defining MAIL_LOCK_FLOCK
4879 EOF
4880 cat >> confdefs.h <<\EOF
4881 #define MAIL_LOCK_FLOCK 1
4882 EOF
4883 }
4884
4885 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4886     Defining MAIL_LOCK_LOCKING
4887 EOF
4888 cat >> confdefs.h <<\EOF
4889 #define MAIL_LOCK_LOCKING 1
4890 EOF
4891 }
4892
4893 elif test "$mail_locking" = "pop"; then
4894   with_pop=yes
4895   mail_locking=
4896 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4897     Defining MAIL_LOCK_DOT
4898 EOF
4899 cat >> confdefs.h <<\EOF
4900 #define MAIL_LOCK_DOT 1
4901 EOF
4902 }
4903
4904 fi
4905 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4906   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4907 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4908   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4909 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4910   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4911
4912 case "$opsys" in decosf*)
4913   
4914 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4915 echo "configure:4916: checking for cma_open in -lpthreads" >&5
4916 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4917
4918 xe_check_libs=" -lpthreads "
4919 cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922 /* Override any gcc2 internal prototype to avoid an error.  */
4923 /* We use char because int might match the return type of a gcc2
4924     builtin and then its argument prototype would still apply.  */
4925 char cma_open();
4926
4927 int main() {
4928 cma_open()
4929 ; return 0; }
4930 EOF
4931 if { (eval echo configure:4932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4932   rm -rf conftest*
4933   eval "ac_cv_lib_$ac_lib_var=yes"
4934 else
4935   echo "configure: failed program was:" >&5
4936   cat conftest.$ac_ext >&5
4937   rm -rf conftest*
4938   eval "ac_cv_lib_$ac_lib_var=no"
4939 fi
4940 rm -f conftest*
4941 xe_check_libs=""
4942
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4944   echo "$ac_t""yes" 1>&6
4945     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4946     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4947   { test "$extra_verbose" = "yes" && cat << EOF
4948     Defining $ac_tr_lib
4949 EOF
4950 cat >> confdefs.h <<EOF
4951 #define $ac_tr_lib 1
4952 EOF
4953 }
4954
4955   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4956
4957 else
4958   echo "$ac_t""no" 1>&6
4959 fi
4960
4961
4962   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4963     c_switch_site="$c_switch_site -threads" ;;
4964 esac
4965
4966 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4967 echo "configure:4968: checking whether the -xildoff compiler flag is required" >&5
4968 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4969   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4970     then echo "$ac_t""no" 1>&6;
4971     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
4972   fi
4973   else echo "$ac_t""no" 1>&6
4974 fi
4975
4976 if test "$opsys" = "sol2"; then
4977   if test "$os_release" -ge 56; then
4978     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4979 echo "configure:4980: checking for \"-z ignore\" linker flag" >&5
4980     case "`ld -h 2>&1`" in
4981       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4982         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4983       *) echo "$ac_t""no" 1>&6 ;;
4984     esac
4985   fi
4986 fi
4987
4988
4989 echo "checking "for specified window system"" 1>&6
4990 echo "configure:4991: checking "for specified window system"" >&5
4991
4992
4993 GNOME_CONFIG=no
4994 GTK_CONFIG=no
4995
4996 if test "$with_gnome" != "no"; then
4997    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
4998 echo "configure:4999: checking for GNOME configuration script" >&5
4999    for possible in gnome-config
5000    do
5001       possible_version=`${possible} --version 2> /dev/null`
5002       if test "x${possible_version}" != "x"; then
5003               GNOME_CONFIG="${possible}"
5004               with_gnome=yes
5005               with_gtk=yes
5006               break
5007       fi
5008    done
5009    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5010 fi
5011
5012 if test "${GNOME_CONFIG}" != "no"; then
5013       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5014       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5015       { test "$extra_verbose" = "yes" && cat << \EOF
5016     Defining HAVE_GNOME
5017 EOF
5018 cat >> confdefs.h <<\EOF
5019 #define HAVE_GNOME 1
5020 EOF
5021 }
5022
5023       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5024       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5025 fi
5026
5027 if test "$with_gtk" != "no";then
5028    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5029 echo "configure:5030: checking for GTK configuration script" >&5
5030    for possible in gtk12-config gtk14-config gtk-config
5031    do
5032       possible_version=`${possible} --version 2> /dev/null`
5033       if test "x${possible_version}" != "x"; then
5034               GTK_CONFIG="${possible}"
5035       fi
5036       case "${possible_version}" in
5037         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5038         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5039         1.2.*)
5040                 with_gtk=yes
5041                 break
5042                 ;;
5043         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5044       esac
5045    done
5046    echo "$ac_t""${GTK_CONFIG}" 1>&6
5047 fi
5048
5049 if test "${GTK_CONFIG}" != "no"; then
5050       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5051 echo "configure:5052: checking gtk version" >&5
5052       GTK_VERSION=`${GTK_CONFIG} --version`
5053       echo "$ac_t""${GTK_VERSION}" 1>&6
5054
5055       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5056 echo "configure:5057: checking gtk libs" >&5
5057       GTK_LIBS=`${GTK_CONFIG} --libs`
5058       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5059       echo "$ac_t""${GTK_LIBS}" 1>&6
5060
5061       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5062 echo "configure:5063: checking gtk cflags" >&5
5063       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5064       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5065       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5066
5067       
5068 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5069 echo "configure:5070: checking for main in -lgdk_imlib" >&5
5070 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5071
5072 xe_check_libs=" -lgdk_imlib "
5073 cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078 main()
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082   rm -rf conftest*
5083   eval "ac_cv_lib_$ac_lib_var=yes"
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=no"
5089 fi
5090 rm -f conftest*
5091 xe_check_libs=""
5092
5093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5094   echo "$ac_t""yes" 1>&6
5095   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5096 else
5097   echo "$ac_t""no" 1>&6
5098 fi
5099
5100
5101       
5102 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5103 echo "configure:5104: checking for Imlib_init in -lImlib" >&5
5104 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5105
5106 xe_check_libs=" -lImlib "
5107 cat > conftest.$ac_ext <<EOF
5108 #line 5109 "configure"
5109 #include "confdefs.h"
5110 /* Override any gcc2 internal prototype to avoid an error.  */
5111 /* We use char because int might match the return type of a gcc2
5112     builtin and then its argument prototype would still apply.  */
5113 char Imlib_init();
5114
5115 int main() {
5116 Imlib_init()
5117 ; return 0; }
5118 EOF
5119 if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=yes"
5122 else
5123   echo "configure: failed program was:" >&5
5124   cat conftest.$ac_ext >&5
5125   rm -rf conftest*
5126   eval "ac_cv_lib_$ac_lib_var=no"
5127 fi
5128 rm -f conftest*
5129 xe_check_libs=""
5130
5131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5132   echo "$ac_t""yes" 1>&6
5133   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5134 else
5135   echo "$ac_t""no" 1>&6
5136 fi
5137
5138
5139       for ac_func in gdk_imlib_init
5140 do
5141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5142 echo "configure:5143: checking for $ac_func" >&5
5143
5144 cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147 /* System header to define __stub macros and hopefully few prototypes,
5148     which can conflict with char $ac_func(); below.  */
5149 #include <assert.h>
5150 /* Override any gcc2 internal prototype to avoid an error.  */
5151 /* We use char because int might match the return type of a gcc2
5152     builtin and then its argument prototype would still apply.  */
5153 char $ac_func();
5154
5155 int main() {
5156
5157 /* The GNU C library defines this for functions which it implements
5158     to always fail with ENOSYS.  Some functions are actually named
5159     something starting with __ and the normal name is an alias.  */
5160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5161 choke me
5162 #else
5163 $ac_func();
5164 #endif
5165
5166 ; return 0; }
5167 EOF
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169   rm -rf conftest*
5170   eval "ac_cv_func_$ac_func=yes"
5171 else
5172   echo "configure: failed program was:" >&5
5173   cat conftest.$ac_ext >&5
5174   rm -rf conftest*
5175   eval "ac_cv_func_$ac_func=no"
5176 fi
5177 rm -f conftest*
5178
5179 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5180   echo "$ac_t""yes" 1>&6
5181     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5182   { test "$extra_verbose" = "yes" && cat << EOF
5183     Defining $ac_tr_func
5184 EOF
5185 cat >> confdefs.h <<EOF
5186 #define $ac_tr_func 1
5187 EOF
5188 }
5189  
5190 else
5191   echo "$ac_t""no" 1>&6
5192 fi
5193 done
5194
5195
5196       { test "$extra_verbose" = "yes" && cat << \EOF
5197     Defining HAVE_XPM
5198 EOF
5199 cat >> confdefs.h <<\EOF
5200 #define HAVE_XPM 1
5201 EOF
5202 }
5203
5204       { test "$extra_verbose" = "yes" && cat << \EOF
5205     Defining HAVE_GTK
5206 EOF
5207 cat >> confdefs.h <<\EOF
5208 #define HAVE_GTK 1
5209 EOF
5210 }
5211
5212       
5213
5214       window_system=gtk
5215       with_gtk=yes
5216       with_x11=no
5217
5218       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5219       test "${with_toolbars}" != no && with_toolbars=gtk
5220       test "${with_menubars}" != "no" && with_menubars=gtk
5221       test "${with_dialogs}" != "no" && with_dialogs=gtk
5222       test "${with_widgets}" != "no" && with_widgets=gtk
5223
5224       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5225    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5226  fi
5227       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5228    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5229  fi
5230       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5231    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5232  fi
5233       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5234    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5235  fi
5236
5237             OLD_CFLAGS="${CFLAGS}"
5238       OLD_LDFLAGS="${LDFLAGS}"
5239       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5240       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5241       for ac_hdr in glade/glade.h glade.h
5242 do
5243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5245 echo "configure:5246: checking for $ac_hdr" >&5
5246
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 #include <$ac_hdr>
5251 EOF
5252 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5253 { (eval echo configure:5254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5254 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5255 if test -z "$ac_err"; then
5256   rm -rf conftest*
5257   eval "ac_cv_header_$ac_safe=yes"
5258 else
5259   echo "$ac_err" >&5
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262   rm -rf conftest*
5263   eval "ac_cv_header_$ac_safe=no"
5264 fi
5265 rm -f conftest*
5266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5267   echo "$ac_t""yes" 1>&6
5268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5269   { test "$extra_verbose" = "yes" && cat << EOF
5270     Defining $ac_tr_hdr
5271 EOF
5272 cat >> confdefs.h <<EOF
5273 #define $ac_tr_hdr 1
5274 EOF
5275 }
5276  
5277 else
5278   echo "$ac_t""no" 1>&6
5279 fi
5280 done
5281
5282       
5283 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5284 echo "configure:5285: checking for main in -lxml" >&5
5285 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5286
5287 xe_check_libs=" -lxml "
5288 cat > conftest.$ac_ext <<EOF
5289 #line 5290 "configure"
5290 #include "confdefs.h"
5291
5292 int main() {
5293 main()
5294 ; return 0; }
5295 EOF
5296 if { (eval echo configure:5297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5297   rm -rf conftest*
5298   eval "ac_cv_lib_$ac_lib_var=yes"
5299 else
5300   echo "configure: failed program was:" >&5
5301   cat conftest.$ac_ext >&5
5302   rm -rf conftest*
5303   eval "ac_cv_lib_$ac_lib_var=no"
5304 fi
5305 rm -f conftest*
5306 xe_check_libs=""
5307
5308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5309   echo "$ac_t""yes" 1>&6
5310   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5311 else
5312   echo "$ac_t""no" 1>&6
5313 fi
5314
5315
5316       
5317 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5318 echo "configure:5319: checking for main in -lglade" >&5
5319 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5320
5321 xe_check_libs=" -lglade "
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325
5326 int main() {
5327 main()
5328 ; return 0; }
5329 EOF
5330 if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5331   rm -rf conftest*
5332   eval "ac_cv_lib_$ac_lib_var=yes"
5333 else
5334   echo "configure: failed program was:" >&5
5335   cat conftest.$ac_ext >&5
5336   rm -rf conftest*
5337   eval "ac_cv_lib_$ac_lib_var=no"
5338 fi
5339 rm -f conftest*
5340 xe_check_libs=""
5341
5342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5343   echo "$ac_t""yes" 1>&6
5344   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5345 else
5346   echo "$ac_t""no" 1>&6
5347 fi
5348
5349
5350       
5351 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5352 echo "configure:5353: checking for main in -lglade-gnome" >&5
5353 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5354
5355 xe_check_libs=" -lglade-gnome "
5356 cat > conftest.$ac_ext <<EOF
5357 #line 5358 "configure"
5358 #include "confdefs.h"
5359
5360 int main() {
5361 main()
5362 ; return 0; }
5363 EOF
5364 if { (eval echo configure:5365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5365   rm -rf conftest*
5366   eval "ac_cv_lib_$ac_lib_var=yes"
5367 else
5368   echo "configure: failed program was:" >&5
5369   cat conftest.$ac_ext >&5
5370   rm -rf conftest*
5371   eval "ac_cv_lib_$ac_lib_var=no"
5372 fi
5373 rm -f conftest*
5374 xe_check_libs=""
5375
5376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5377   echo "$ac_t""yes" 1>&6
5378   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5379 else
5380   echo "$ac_t""no" 1>&6
5381 fi
5382
5383
5384       cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387 #include <glade/glade-xml.h>
5388 EOF
5389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5390   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5391   rm -rf conftest*
5392   echo "$ac_t""yes" 1>&6
5393                        { test "$extra_verbose" = "yes" && cat << \EOF
5394     Defining LIBGLADE_XML_TXTDOMAIN = 1
5395 EOF
5396 cat >> confdefs.h <<\EOF
5397 #define LIBGLADE_XML_TXTDOMAIN 1
5398 EOF
5399 }
5400
5401 else
5402   rm -rf conftest*
5403   echo "$ac_t""no" 1>&6
5404 fi
5405 rm -f conftest*
5406
5407       CFLAGS="${OLD_CFLAGS}"
5408       LDFLAGS="${OLD_LDFLAGS}"
5409 fi
5410
5411
5412 if test "$with_x11" != "no"; then
5413     test "$x_includes $x_libraries" != "NONE NONE" && \
5414    window_system=x11 with_x11=yes
5415
5416         
5417       if test "$x_includes $x_libraries" = "NONE NONE" \
5418     -a -n "$OPENWINHOME" \
5419     -a "$OPENWINHOME" != "/usr/openwin" \
5420     -a -d "$OPENWINHOME"; then
5421       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5422       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5423       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5424   fi
5425
5426   if test "$x_includes" = "NONE"; then
5427                     for dir in "/usr/X11" "/usr/X11R6"; do
5428       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5429     done
5430   fi
5431
5432   if test "$x_libraries" = "NONE"; then
5433     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5434       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5435     done
5436   fi
5437
5438   # If we find X, set shell vars x_includes and x_libraries to the
5439 # paths, otherwise set no_x=yes.
5440 # Uses ac_ vars as temps to allow command line to override cache and checks.
5441 # --without-x overrides everything else, but does not touch the cache.
5442 echo $ac_n "checking for X""... $ac_c" 1>&6
5443 echo "configure:5444: checking for X" >&5
5444
5445 # Check whether --with-x or --without-x was given.
5446 if test "${with_x+set}" = set; then
5447   withval="$with_x"
5448   :
5449 fi
5450
5451 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5452 if test "x$with_x" = xno; then
5453   # The user explicitly disabled X.
5454   have_x=disabled
5455 else
5456   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5457     # Both variables are already set.
5458     have_x=yes
5459   else
5460
5461 # One or both of the vars are not set, and there is no cached value.
5462 ac_x_includes=NO ac_x_libraries=NO
5463 rm -fr conftestdir
5464 if mkdir conftestdir; then
5465   cd conftestdir
5466   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5467   cat > Imakefile <<'EOF'
5468 acfindx:
5469         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5470 EOF
5471   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5472     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5473     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5474     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5475     for ac_extension in a so sl; do
5476       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5477         test -f $ac_im_libdir/libX11.$ac_extension; then
5478         ac_im_usrlibdir=$ac_im_libdir; break
5479       fi
5480     done
5481     # Screen out bogus values from the imake configuration.  They are
5482     # bogus both because they are the default anyway, and because
5483     # using them would break gcc on systems where it needs fixed includes.
5484     case "$ac_im_incroot" in
5485         /usr/include) ;;
5486         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5487     esac
5488     case "$ac_im_usrlibdir" in
5489         /usr/lib | /lib) ;;
5490         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5491     esac
5492   fi
5493   cd ..
5494   rm -fr conftestdir
5495 fi
5496
5497 if test "$ac_x_includes" = NO; then
5498   # Guess where to find include files, by looking for this one X11 .h file.
5499   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5500
5501   # First, try using that file with no special directory specified.
5502 cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 #include <$x_direct_test_include>
5506 EOF
5507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5508 { (eval echo configure:5509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5510 if test -z "$ac_err"; then
5511   rm -rf conftest*
5512   # We can compile using X headers with no special include directory.
5513 ac_x_includes=
5514 else
5515   echo "$ac_err" >&5
5516   echo "configure: failed program was:" >&5
5517   cat conftest.$ac_ext >&5
5518   rm -rf conftest*
5519   # Look for the header file in a standard set of common directories.
5520 # Check X11 before X11Rn because it is often a symlink to the current release.
5521   for ac_dir in               \
5522     /usr/X11/include          \
5523     /usr/X11R6/include        \
5524     /usr/X11R5/include        \
5525     /usr/X11R4/include        \
5526                               \
5527     /usr/include/X11          \
5528     /usr/include/X11R6        \
5529     /usr/include/X11R5        \
5530     /usr/include/X11R4        \
5531                               \
5532     /usr/local/X11/include    \
5533     /usr/local/X11R6/include  \
5534     /usr/local/X11R5/include  \
5535     /usr/local/X11R4/include  \
5536                               \
5537     /usr/local/include/X11    \
5538     /usr/local/include/X11R6  \
5539     /usr/local/include/X11R5  \
5540     /usr/local/include/X11R4  \
5541                               \
5542     /usr/X386/include         \
5543     /usr/x386/include         \
5544     /usr/XFree86/include/X11  \
5545                               \
5546     /usr/include              \
5547     /usr/local/include        \
5548     /usr/unsupported/include  \
5549     /usr/athena/include       \
5550     /usr/local/x11r5/include  \
5551     /usr/lpp/Xamples/include  \
5552                               \
5553     /usr/openwin/include      \
5554     /usr/openwin/share/include \
5555     ; \
5556   do
5557     if test -r "$ac_dir/$x_direct_test_include"; then
5558       ac_x_includes=$ac_dir
5559       break
5560     fi
5561   done
5562 fi
5563 rm -f conftest*
5564 fi # $ac_x_includes = NO
5565
5566 if test "$ac_x_libraries" = NO; then
5567   # Check for the libraries.
5568
5569   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5570   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5571
5572   # See if we find them without any special options.
5573   # Don't add to $LIBS permanently.
5574   ac_save_LIBS="$LIBS"
5575   LIBS="-l$x_direct_test_library $LIBS"
5576 cat > conftest.$ac_ext <<EOF
5577 #line 5578 "configure"
5578 #include "confdefs.h"
5579
5580 int main() {
5581 ${x_direct_test_function}()
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   LIBS="$ac_save_LIBS"
5587 # We can link X programs with no special library path.
5588 ac_x_libraries=
5589 else
5590   echo "configure: failed program was:" >&5
5591   cat conftest.$ac_ext >&5
5592   rm -rf conftest*
5593   LIBS="$ac_save_LIBS"
5594 # First see if replacing the include by lib works.
5595 # Check X11 before X11Rn because it is often a symlink to the current release.
5596 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5597     /usr/X11/lib          \
5598     /usr/X11R6/lib        \
5599     /usr/X11R5/lib        \
5600     /usr/X11R4/lib        \
5601                           \
5602     /usr/lib/X11          \
5603     /usr/lib/X11R6        \
5604     /usr/lib/X11R5        \
5605     /usr/lib/X11R4        \
5606                           \
5607     /usr/local/X11/lib    \
5608     /usr/local/X11R6/lib  \
5609     /usr/local/X11R5/lib  \
5610     /usr/local/X11R4/lib  \
5611                           \
5612     /usr/local/lib/X11    \
5613     /usr/local/lib/X11R6  \
5614     /usr/local/lib/X11R5  \
5615     /usr/local/lib/X11R4  \
5616                           \
5617     /usr/X386/lib         \
5618     /usr/x386/lib         \
5619     /usr/XFree86/lib/X11  \
5620                           \
5621     /usr/lib              \
5622     /usr/local/lib        \
5623     /usr/unsupported/lib  \
5624     /usr/athena/lib       \
5625     /usr/local/x11r5/lib  \
5626     /usr/lpp/Xamples/lib  \
5627     /lib/usr/lib/X11      \
5628                           \
5629     /usr/openwin/lib      \
5630     /usr/openwin/share/lib \
5631     ; \
5632 do
5633   for ac_extension in a so sl; do
5634     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5635       ac_x_libraries=$ac_dir
5636       break 2
5637     fi
5638   done
5639 done
5640 fi
5641 rm -f conftest*
5642 fi # $ac_x_libraries = NO
5643
5644 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5645   # Didn't find X anywhere.  Cache the known absence of X.
5646   ac_cv_have_x="have_x=no"
5647 else
5648   # Record where we found X for the cache.
5649   ac_cv_have_x="have_x=yes \
5650                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5651 fi
5652   fi
5653   eval "$ac_cv_have_x"
5654 fi # $with_x != no
5655
5656 if test "$have_x" != yes; then
5657   echo "$ac_t""$have_x" 1>&6
5658   no_x=yes
5659 else
5660   # If each of the values was on the command line, it overrides each guess.
5661   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5662   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5663   # Update the cache value to reflect the command line values.
5664   ac_cv_have_x="have_x=yes \
5665                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5666   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5667 fi
5668
5669 if test "$no_x" = yes; then
5670   # Not all programs may use this symbol, but it does not hurt to define it.
5671   { test "$extra_verbose" = "yes" && cat << \EOF
5672     Defining X_DISPLAY_MISSING
5673 EOF
5674 cat >> confdefs.h <<\EOF
5675 #define X_DISPLAY_MISSING 1
5676 EOF
5677 }
5678
5679   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5680 else
5681   if test -n "$x_includes"; then
5682     X_CFLAGS="$X_CFLAGS -I$x_includes"
5683   fi
5684
5685   # It would also be nice to do this for all -L options, not just this one.
5686   if test -n "$x_libraries"; then
5687     X_LIBS="$X_LIBS -L$x_libraries"
5688     # For Solaris; some versions of Sun CC require a space after -R and
5689     # others require no space.  Words are not sufficient . . . .
5690     case "`(uname -sr) 2>/dev/null`" in
5691     "SunOS 5"*)
5692       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5693 echo "configure:5694: checking whether -R must be followed by a space" >&5
5694       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5695       cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698
5699 int main() {
5700
5701 ; return 0; }
5702 EOF
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5704   rm -rf conftest*
5705   ac_R_nospace=yes
5706 else
5707   echo "configure: failed program was:" >&5
5708   cat conftest.$ac_ext >&5
5709   rm -rf conftest*
5710   ac_R_nospace=no
5711 fi
5712 rm -f conftest*
5713       if test $ac_R_nospace = yes; then
5714         echo "$ac_t""no" 1>&6
5715         X_LIBS="$X_LIBS -R$x_libraries"
5716       else
5717         LIBS="$ac_xsave_LIBS -R $x_libraries"
5718         cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721
5722 int main() {
5723
5724 ; return 0; }
5725 EOF
5726 if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5727   rm -rf conftest*
5728   ac_R_space=yes
5729 else
5730   echo "configure: failed program was:" >&5
5731   cat conftest.$ac_ext >&5
5732   rm -rf conftest*
5733   ac_R_space=no
5734 fi
5735 rm -f conftest*
5736         if test $ac_R_space = yes; then
5737           echo "$ac_t""yes" 1>&6
5738           X_LIBS="$X_LIBS -R $x_libraries"
5739         else
5740           echo "$ac_t""neither works" 1>&6
5741         fi
5742       fi
5743       LIBS="$ac_xsave_LIBS"
5744     esac
5745   fi
5746
5747   # Check for system-dependent libraries X programs must link with.
5748   # Do this before checking for the system-independent R6 libraries
5749   # (-lICE), since we may need -lsocket or whatever for X linking.
5750
5751   if test "$ISC" = yes; then
5752     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5753   else
5754     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5755     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5756     # the Alpha needs dnet_stub (dnet does not exist).
5757     if test "$with_dnet" = "no" ; then
5758 ac_cv_lib_dnet_dnet_ntoa=no
5759 else
5760
5761 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5762 echo "configure:5763: checking for dnet_ntoa in -ldnet" >&5
5763 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5764
5765 xe_check_libs=" -ldnet "
5766 cat > conftest.$ac_ext <<EOF
5767 #line 5768 "configure"
5768 #include "confdefs.h"
5769 /* Override any gcc2 internal prototype to avoid an error.  */
5770 /* We use char because int might match the return type of a gcc2
5771     builtin and then its argument prototype would still apply.  */
5772 char dnet_ntoa();
5773
5774 int main() {
5775 dnet_ntoa()
5776 ; return 0; }
5777 EOF
5778 if { (eval echo configure:5779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5779   rm -rf conftest*
5780   eval "ac_cv_lib_$ac_lib_var=yes"
5781 else
5782   echo "configure: failed program was:" >&5
5783   cat conftest.$ac_ext >&5
5784   rm -rf conftest*
5785   eval "ac_cv_lib_$ac_lib_var=no"
5786 fi
5787 rm -f conftest*
5788 xe_check_libs=""
5789
5790 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5791   echo "$ac_t""yes" 1>&6
5792   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5793 else
5794   echo "$ac_t""no" 1>&6
5795 fi
5796
5797 fi
5798
5799     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5800       
5801 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5802 echo "configure:5803: checking for dnet_ntoa in -ldnet_stub" >&5
5803 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5804
5805 xe_check_libs=" -ldnet_stub "
5806 cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* Override any gcc2 internal prototype to avoid an error.  */
5810 /* We use char because int might match the return type of a gcc2
5811     builtin and then its argument prototype would still apply.  */
5812 char dnet_ntoa();
5813
5814 int main() {
5815 dnet_ntoa()
5816 ; return 0; }
5817 EOF
5818 if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=yes"
5821 else
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=no"
5826 fi
5827 rm -f conftest*
5828 xe_check_libs=""
5829
5830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5831   echo "$ac_t""yes" 1>&6
5832   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5833 else
5834   echo "$ac_t""no" 1>&6
5835 fi
5836
5837
5838     fi
5839
5840     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5841     # to get the SysV transport functions.
5842     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5843     # needs -lnsl.
5844     # The nsl library prevents programs from opening the X display
5845     # on Irix 5.2, according to dickey@clark.net.
5846     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5847 echo "configure:5848: checking for gethostbyname" >&5
5848
5849 cat > conftest.$ac_ext <<EOF
5850 #line 5851 "configure"
5851 #include "confdefs.h"
5852 /* System header to define __stub macros and hopefully few prototypes,
5853     which can conflict with char gethostbyname(); below.  */
5854 #include <assert.h>
5855 /* Override any gcc2 internal prototype to avoid an error.  */
5856 /* We use char because int might match the return type of a gcc2
5857     builtin and then its argument prototype would still apply.  */
5858 char gethostbyname();
5859
5860 int main() {
5861
5862 /* The GNU C library defines this for functions which it implements
5863     to always fail with ENOSYS.  Some functions are actually named
5864     something starting with __ and the normal name is an alias.  */
5865 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5866 choke me
5867 #else
5868 gethostbyname();
5869 #endif
5870
5871 ; return 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5874   rm -rf conftest*
5875   eval "ac_cv_func_gethostbyname=yes"
5876 else
5877   echo "configure: failed program was:" >&5
5878   cat conftest.$ac_ext >&5
5879   rm -rf conftest*
5880   eval "ac_cv_func_gethostbyname=no"
5881 fi
5882 rm -f conftest*
5883
5884 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5885   echo "$ac_t""yes" 1>&6
5886   :
5887 else
5888   echo "$ac_t""no" 1>&6
5889 fi
5890
5891     if test $ac_cv_func_gethostbyname = no; then
5892       
5893 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5894 echo "configure:5895: checking for gethostbyname in -lnsl" >&5
5895 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5896
5897 xe_check_libs=" -lnsl "
5898 cat > conftest.$ac_ext <<EOF
5899 #line 5900 "configure"
5900 #include "confdefs.h"
5901 /* Override any gcc2 internal prototype to avoid an error.  */
5902 /* We use char because int might match the return type of a gcc2
5903     builtin and then its argument prototype would still apply.  */
5904 char gethostbyname();
5905
5906 int main() {
5907 gethostbyname()
5908 ; return 0; }
5909 EOF
5910 if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5911   rm -rf conftest*
5912   eval "ac_cv_lib_$ac_lib_var=yes"
5913 else
5914   echo "configure: failed program was:" >&5
5915   cat conftest.$ac_ext >&5
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=no"
5918 fi
5919 rm -f conftest*
5920 xe_check_libs=""
5921
5922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5923   echo "$ac_t""yes" 1>&6
5924   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5925 else
5926   echo "$ac_t""no" 1>&6
5927 fi
5928
5929
5930     fi
5931
5932     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5933     # socket/setsockopt and other routines are undefined under SCO ODT
5934     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5935     # on later versions), says simon@lia.di.epfl.ch: it contains
5936     # gethostby* variants that don't use the nameserver (or something).
5937     # -lsocket must be given before -lnsl if both are needed.
5938     # We assume that if connect needs -lnsl, so does gethostbyname.
5939     echo $ac_n "checking for connect""... $ac_c" 1>&6
5940 echo "configure:5941: checking for connect" >&5
5941
5942 cat > conftest.$ac_ext <<EOF
5943 #line 5944 "configure"
5944 #include "confdefs.h"
5945 /* System header to define __stub macros and hopefully few prototypes,
5946     which can conflict with char connect(); below.  */
5947 #include <assert.h>
5948 /* Override any gcc2 internal prototype to avoid an error.  */
5949 /* We use char because int might match the return type of a gcc2
5950     builtin and then its argument prototype would still apply.  */
5951 char connect();
5952
5953 int main() {
5954
5955 /* The GNU C library defines this for functions which it implements
5956     to always fail with ENOSYS.  Some functions are actually named
5957     something starting with __ and the normal name is an alias.  */
5958 #if defined (__stub_connect) || defined (__stub___connect)
5959 choke me
5960 #else
5961 connect();
5962 #endif
5963
5964 ; return 0; }
5965 EOF
5966 if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5967   rm -rf conftest*
5968   eval "ac_cv_func_connect=yes"
5969 else
5970   echo "configure: failed program was:" >&5
5971   cat conftest.$ac_ext >&5
5972   rm -rf conftest*
5973   eval "ac_cv_func_connect=no"
5974 fi
5975 rm -f conftest*
5976
5977 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5978   echo "$ac_t""yes" 1>&6
5979   :
5980 else
5981   echo "$ac_t""no" 1>&6
5982 fi
5983
5984     if test $ac_cv_func_connect = no; then
5985       
5986 xe_msg_checking="for connect in -lsocket"
5987 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5988 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5989 echo "configure:5990: checking "$xe_msg_checking"" >&5
5990 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5991
5992 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char connect();
6000
6001 int main() {
6002 connect()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 xe_check_libs=""
6016
6017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6018   echo "$ac_t""yes" 1>&6
6019   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6020 else
6021   echo "$ac_t""no" 1>&6
6022 fi
6023
6024
6025     fi
6026
6027     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6028     echo $ac_n "checking for remove""... $ac_c" 1>&6
6029 echo "configure:6030: checking for remove" >&5
6030
6031 cat > conftest.$ac_ext <<EOF
6032 #line 6033 "configure"
6033 #include "confdefs.h"
6034 /* System header to define __stub macros and hopefully few prototypes,
6035     which can conflict with char remove(); below.  */
6036 #include <assert.h>
6037 /* Override any gcc2 internal prototype to avoid an error.  */
6038 /* We use char because int might match the return type of a gcc2
6039     builtin and then its argument prototype would still apply.  */
6040 char remove();
6041
6042 int main() {
6043
6044 /* The GNU C library defines this for functions which it implements
6045     to always fail with ENOSYS.  Some functions are actually named
6046     something starting with __ and the normal name is an alias.  */
6047 #if defined (__stub_remove) || defined (__stub___remove)
6048 choke me
6049 #else
6050 remove();
6051 #endif
6052
6053 ; return 0; }
6054 EOF
6055 if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6056   rm -rf conftest*
6057   eval "ac_cv_func_remove=yes"
6058 else
6059   echo "configure: failed program was:" >&5
6060   cat conftest.$ac_ext >&5
6061   rm -rf conftest*
6062   eval "ac_cv_func_remove=no"
6063 fi
6064 rm -f conftest*
6065
6066 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6067   echo "$ac_t""yes" 1>&6
6068   :
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072
6073     if test $ac_cv_func_remove = no; then
6074       
6075 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6076 echo "configure:6077: checking for remove in -lposix" >&5
6077 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6078
6079 xe_check_libs=" -lposix "
6080 cat > conftest.$ac_ext <<EOF
6081 #line 6082 "configure"
6082 #include "confdefs.h"
6083 /* Override any gcc2 internal prototype to avoid an error.  */
6084 /* We use char because int might match the return type of a gcc2
6085     builtin and then its argument prototype would still apply.  */
6086 char remove();
6087
6088 int main() {
6089 remove()
6090 ; return 0; }
6091 EOF
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093   rm -rf conftest*
6094   eval "ac_cv_lib_$ac_lib_var=yes"
6095 else
6096   echo "configure: failed program was:" >&5
6097   cat conftest.$ac_ext >&5
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=no"
6100 fi
6101 rm -f conftest*
6102 xe_check_libs=""
6103
6104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6105   echo "$ac_t""yes" 1>&6
6106   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110
6111
6112     fi
6113
6114     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6115     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6116 echo "configure:6117: checking for shmat" >&5
6117
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* System header to define __stub macros and hopefully few prototypes,
6122     which can conflict with char shmat(); below.  */
6123 #include <assert.h>
6124 /* Override any gcc2 internal prototype to avoid an error.  */
6125 /* We use char because int might match the return type of a gcc2
6126     builtin and then its argument prototype would still apply.  */
6127 char shmat();
6128
6129 int main() {
6130
6131 /* The GNU C library defines this for functions which it implements
6132     to always fail with ENOSYS.  Some functions are actually named
6133     something starting with __ and the normal name is an alias.  */
6134 #if defined (__stub_shmat) || defined (__stub___shmat)
6135 choke me
6136 #else
6137 shmat();
6138 #endif
6139
6140 ; return 0; }
6141 EOF
6142 if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6143   rm -rf conftest*
6144   eval "ac_cv_func_shmat=yes"
6145 else
6146   echo "configure: failed program was:" >&5
6147   cat conftest.$ac_ext >&5
6148   rm -rf conftest*
6149   eval "ac_cv_func_shmat=no"
6150 fi
6151 rm -f conftest*
6152
6153 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6154   echo "$ac_t""yes" 1>&6
6155   :
6156 else
6157   echo "$ac_t""no" 1>&6
6158 fi
6159
6160     if test $ac_cv_func_shmat = no; then
6161       
6162 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6163 echo "configure:6164: checking for shmat in -lipc" >&5
6164 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6165
6166 xe_check_libs=" -lipc "
6167 cat > conftest.$ac_ext <<EOF
6168 #line 6169 "configure"
6169 #include "confdefs.h"
6170 /* Override any gcc2 internal prototype to avoid an error.  */
6171 /* We use char because int might match the return type of a gcc2
6172     builtin and then its argument prototype would still apply.  */
6173 char shmat();
6174
6175 int main() {
6176 shmat()
6177 ; return 0; }
6178 EOF
6179 if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6180   rm -rf conftest*
6181   eval "ac_cv_lib_$ac_lib_var=yes"
6182 else
6183   echo "configure: failed program was:" >&5
6184   cat conftest.$ac_ext >&5
6185   rm -rf conftest*
6186   eval "ac_cv_lib_$ac_lib_var=no"
6187 fi
6188 rm -f conftest*
6189 xe_check_libs=""
6190
6191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6192   echo "$ac_t""yes" 1>&6
6193   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6194 else
6195   echo "$ac_t""no" 1>&6
6196 fi
6197
6198
6199     fi
6200   fi
6201
6202   # Check for libraries that X11R6 Xt/Xaw programs need.
6203   ac_save_LDFLAGS="$LDFLAGS"
6204   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6205   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6206   # check for ICE first), but we must link in the order -lSM -lICE or
6207   # we get undefined symbols.  So assume we have SM if we have ICE.
6208   # These have to be linked with before -lX11, unlike the other
6209   # libraries we check for below, so use a different variable.
6210   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6211   
6212 xe_msg_checking="for IceConnectionNumber in -lICE"
6213 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6214 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6215 echo "configure:6216: checking "$xe_msg_checking"" >&5
6216 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6217
6218 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char IceConnectionNumber();
6226
6227 int main() {
6228 IceConnectionNumber()
6229 ; return 0; }
6230 EOF
6231 if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=yes"
6234 else
6235   echo "configure: failed program was:" >&5
6236   cat conftest.$ac_ext >&5
6237   rm -rf conftest*
6238   eval "ac_cv_lib_$ac_lib_var=no"
6239 fi
6240 rm -f conftest*
6241 xe_check_libs=""
6242
6243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6244   echo "$ac_t""yes" 1>&6
6245   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249
6250
6251   LDFLAGS="$ac_save_LDFLAGS"
6252
6253 fi
6254  # Autoconf claims to find X library and include dirs for us.
6255   if test "$no_x" = "yes"
6256   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6257   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6258   fi
6259 fi
6260
6261
6262 if test "$with_x11" = "yes"; then
6263   { test "$extra_verbose" = "yes" && cat << \EOF
6264     Defining HAVE_X_WINDOWS
6265 EOF
6266 cat >> confdefs.h <<\EOF
6267 #define HAVE_X_WINDOWS 1
6268 EOF
6269 }
6270
6271   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6272   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6273
6274       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6275     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6276     if test -d "$lib_dir" -a -d "$inc_dir"; then
6277       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6278         x_libraries="$lib_dir $x_libraries"
6279         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6280       esac
6281       case "$x_includes" in "$inc_dir"* ) ;; *)
6282         x_includes="$inc_dir $x_includes"
6283         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6284       esac
6285       break;       fi
6286   done
6287
6288     for rel in "X11R6" "X11R5" "X11R4"; do
6289     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6290     if test -d "$lib_dir" -a -d "$inc_dir"; then
6291       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6292         x_libraries="$x_libraries $lib_dir"
6293         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6294       esac
6295       case "$x_includes" in "$inc_dir"* ) ;; *)
6296         x_includes="$x_includes $inc_dir"
6297         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6298       esac
6299       break;     fi
6300   done
6301
6302     case "$opsys" in
6303   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 ;;
6304   esac
6305
6306   ld_switch_x_site="$X_LIBS"
6307
6308   
6309 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6310     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6311   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6312   
6313         runpath="" runpath_dirs=""
6314   if test -n "$LD_RUN_PATH"; then
6315     runpath="$LD_RUN_PATH"
6316   elif test "$GCC" = "yes"; then
6317         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6318     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6319     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6320     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6321       case "$arg" in P,* | -L* | -R* )
6322         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6323           {
6324 xe_runpath_dir="$dir"
6325   test "$xe_runpath_dir" != "/lib"     -a \
6326         "$xe_runpath_dir" != "/usr/lib" -a \
6327         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6328   eval "$xe_add_unique_runpath_dir"
6329 }
6330         done ;;
6331       esac
6332     done
6333     ld_switch_run="$ld_switch_run_save"
6334     rm -f conftest*
6335   else
6336         for arg in $ld_switch_site $ld_switch_x_site; do
6337       case "$arg" in -L*) {
6338 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6339   test "$xe_runpath_dir" != "/lib"     -a \
6340         "$xe_runpath_dir" != "/usr/lib" -a \
6341         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6342   eval "$xe_add_unique_runpath_dir"
6343 };; esac
6344     done
6345         if test "$opsys $need_motif" = "sol2 yes"; then
6346       xe_runpath_dir="/opt/SUNWdt/lib";
6347       eval "$xe_add_unique_runpath_dir";
6348     fi
6349   fi 
6350   if test -n "$runpath"; then
6351     ld_switch_run="${dash_r}${runpath}"
6352     
6353 if test "$GCC" = "yes"; then
6354   set x $ld_switch_run; shift; ld_switch_run=""
6355   while test -n "$1"; do
6356     case $1 in
6357       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6358       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6359       -Xlinker* ) ;;
6360       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6361     esac
6362     shift
6363   done
6364 fi
6365     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6366   fi
6367 fi
6368
6369
6370   if test "$extra_verbose" = "yes"; then
6371     echo; echo "X11 compilation variables:"
6372     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6373     echo
6374   fi
6375
6376             bitmapdirs=
6377   if test "$x_includes" != NONE; then
6378     for i in $x_includes; do
6379       if test -d "$i/bitmaps"; then
6380         bitmapdirs="$i/bitmaps:$bitmapdirs"
6381       fi
6382       if test -d "$i/X11/bitmaps"; then
6383         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6384       fi
6385     done
6386     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6387   fi
6388   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6389     Defining BITMAPDIR = "$bitmapdirs"
6390 EOF
6391 cat >> confdefs.h <<EOF
6392 #define BITMAPDIR "$bitmapdirs"
6393 EOF
6394 }
6395
6396
6397     echo "checking for X defines extracted by xmkmf" 1>&6
6398 echo "configure:6399: checking for X defines extracted by xmkmf" >&5
6399   rm -fr conftestdir
6400   if mkdir conftestdir; then
6401     cd conftestdir
6402     cat > Imakefile <<'EOF'
6403 xetest:
6404         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6405 EOF
6406     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6407       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6408       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6409     fi
6410     cd ..
6411     rm -fr conftestdir
6412     for word in $xmkmf_defines; do
6413       case "$word" in 
6414       -D__STDC__*) ;;
6415       -D* )
6416         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6417         case "$word" in
6418           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6419           *     ) val=1 ;;
6420         esac
6421         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6422           if test "$val" = "1"
6423             then { test "$extra_verbose" = "yes" && cat << EOF
6424     Defining $sym
6425 EOF
6426 cat >> confdefs.h <<EOF
6427 #define $sym 1
6428 EOF
6429 }
6430
6431             else { test "$extra_verbose" = "yes" && cat << EOF
6432     Defining $sym = $val
6433 EOF
6434 cat >> confdefs.h <<EOF
6435 #define $sym $val
6436 EOF
6437 }
6438
6439           fi
6440         fi  ;;
6441       esac
6442     done
6443   fi
6444
6445     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6446 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6447 echo "configure:6448: checking for X11/Intrinsic.h" >&5
6448
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <X11/Intrinsic.h>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6469   echo "$ac_t""yes" 1>&6
6470   :
6471 else
6472   echo "$ac_t""no" 1>&6
6473 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6474 fi
6475
6476
6477       
6478 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6479 echo "configure:6480: checking for XOpenDisplay in -lX11" >&5
6480 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6481
6482 xe_check_libs=" -lX11 "
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 /* Override any gcc2 internal prototype to avoid an error.  */
6487 /* We use char because int might match the return type of a gcc2
6488     builtin and then its argument prototype would still apply.  */
6489 char XOpenDisplay();
6490
6491 int main() {
6492 XOpenDisplay()
6493 ; return 0; }
6494 EOF
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6496   rm -rf conftest*
6497   eval "ac_cv_lib_$ac_lib_var=yes"
6498 else
6499   echo "configure: failed program was:" >&5
6500   cat conftest.$ac_ext >&5
6501   rm -rf conftest*
6502   eval "ac_cv_lib_$ac_lib_var=no"
6503 fi
6504 rm -f conftest*
6505 xe_check_libs=""
6506
6507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6508   echo "$ac_t""yes" 1>&6
6509   have_lib_x11=yes
6510 else
6511   echo "$ac_t""no" 1>&6
6512 fi
6513
6514
6515   if test "$have_lib_x11" != "yes"; then
6516     
6517 xe_msg_checking="for XGetFontProperty in -lX11"
6518 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6519 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6520 echo "configure:6521: checking "$xe_msg_checking"" >&5
6521 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6522
6523 xe_check_libs=" -lX11 -b i486-linuxaout"
6524 cat > conftest.$ac_ext <<EOF
6525 #line 6526 "configure"
6526 #include "confdefs.h"
6527 /* Override any gcc2 internal prototype to avoid an error.  */
6528 /* We use char because int might match the return type of a gcc2
6529     builtin and then its argument prototype would still apply.  */
6530 char XGetFontProperty();
6531
6532 int main() {
6533 XGetFontProperty()
6534 ; return 0; }
6535 EOF
6536 if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6537   rm -rf conftest*
6538   eval "ac_cv_lib_$ac_lib_var=yes"
6539 else
6540   echo "configure: failed program was:" >&5
6541   cat conftest.$ac_ext >&5
6542   rm -rf conftest*
6543   eval "ac_cv_lib_$ac_lib_var=no"
6544 fi
6545 rm -f conftest*
6546 xe_check_libs=""
6547
6548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6549   echo "$ac_t""yes" 1>&6
6550   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6551 else
6552   echo "$ac_t""no" 1>&6
6553 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6554 fi
6555
6556
6557   fi
6558   libs_x="-lX11"
6559   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6560
6561     
6562 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6563 echo "configure:6564: checking for XShapeSelectInput in -lXext" >&5
6564 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6565
6566 xe_check_libs=" -lXext "
6567 cat > conftest.$ac_ext <<EOF
6568 #line 6569 "configure"
6569 #include "confdefs.h"
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 /* We use char because int might match the return type of a gcc2
6572     builtin and then its argument prototype would still apply.  */
6573 char XShapeSelectInput();
6574
6575 int main() {
6576 XShapeSelectInput()
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=yes"
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   eval "ac_cv_lib_$ac_lib_var=no"
6587 fi
6588 rm -f conftest*
6589 xe_check_libs=""
6590
6591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6592   echo "$ac_t""yes" 1>&6
6593   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6594 else
6595   echo "$ac_t""no" 1>&6
6596 fi
6597
6598
6599
6600     
6601 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6602 echo "configure:6603: checking for XtOpenDisplay in -lXt" >&5
6603 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6604
6605 xe_check_libs=" -lXt "
6606 cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* Override any gcc2 internal prototype to avoid an error.  */
6610 /* We use char because int might match the return type of a gcc2
6611     builtin and then its argument prototype would still apply.  */
6612 char XtOpenDisplay();
6613
6614 int main() {
6615 XtOpenDisplay()
6616 ; return 0; }
6617 EOF
6618 if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=yes"
6621 else
6622   echo "configure: failed program was:" >&5
6623   cat conftest.$ac_ext >&5
6624   rm -rf conftest*
6625   eval "ac_cv_lib_$ac_lib_var=no"
6626 fi
6627 rm -f conftest*
6628 xe_check_libs=""
6629
6630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6631   echo "$ac_t""yes" 1>&6
6632   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6633 else
6634   echo "$ac_t""no" 1>&6
6635 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6636 fi
6637
6638
6639
6640   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6641 echo "configure:6642: checking the version of X11 being used" >&5
6642   cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645 #include <X11/Intrinsic.h>
6646     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6647 EOF
6648 if { (eval echo configure:6649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6649 then
6650   ./conftest foobar; x11_release=$?
6651 else
6652   conftest_rc="$?"
6653   echo "configure: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   rm -fr conftest*
6656   x11_release=4
6657 fi
6658 rm -fr conftest*
6659   echo "$ac_t""R${x11_release}" 1>&6
6660   { test "$extra_verbose" = "yes" && cat << EOF
6661     Defining THIS_IS_X11R${x11_release}
6662 EOF
6663 cat >> confdefs.h <<EOF
6664 #define THIS_IS_X11R${x11_release} 1
6665 EOF
6666 }
6667
6668
6669   if test "${x11_release}" = "4"; then
6670     case "$with_widgets" in
6671       "" | "no") with_widgets=no ;;
6672       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6673     esac
6674   fi
6675
6676   for ac_func in XConvertCase
6677 do
6678 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6679 echo "configure:6680: checking for $ac_func" >&5
6680
6681 cat > conftest.$ac_ext <<EOF
6682 #line 6683 "configure"
6683 #include "confdefs.h"
6684 /* System header to define __stub macros and hopefully few prototypes,
6685     which can conflict with char $ac_func(); below.  */
6686 #include <assert.h>
6687 /* Override any gcc2 internal prototype to avoid an error.  */
6688 /* We use char because int might match the return type of a gcc2
6689     builtin and then its argument prototype would still apply.  */
6690 char $ac_func();
6691
6692 int main() {
6693
6694 /* The GNU C library defines this for functions which it implements
6695     to always fail with ENOSYS.  Some functions are actually named
6696     something starting with __ and the normal name is an alias.  */
6697 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6698 choke me
6699 #else
6700 $ac_func();
6701 #endif
6702
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6706   rm -rf conftest*
6707   eval "ac_cv_func_$ac_func=yes"
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   eval "ac_cv_func_$ac_func=no"
6713 fi
6714 rm -f conftest*
6715
6716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6717   echo "$ac_t""yes" 1>&6
6718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6719   { test "$extra_verbose" = "yes" && cat << EOF
6720     Defining $ac_tr_func
6721 EOF
6722 cat >> confdefs.h <<EOF
6723 #define $ac_tr_func 1
6724 EOF
6725 }
6726  
6727 else
6728   echo "$ac_t""no" 1>&6
6729 fi
6730 done
6731
6732
6733   for ac_hdr in X11/Xlocale.h
6734 do
6735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6737 echo "configure:6738: checking for $ac_hdr" >&5
6738
6739 cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742 #include <$ac_hdr>
6743 EOF
6744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6745 { (eval echo configure:6746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6747 if test -z "$ac_err"; then
6748   rm -rf conftest*
6749   eval "ac_cv_header_$ac_safe=yes"
6750 else
6751   echo "$ac_err" >&5
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_header_$ac_safe=no"
6756 fi
6757 rm -f conftest*
6758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6759   echo "$ac_t""yes" 1>&6
6760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6761   { test "$extra_verbose" = "yes" && cat << EOF
6762     Defining $ac_tr_hdr
6763 EOF
6764 cat >> confdefs.h <<EOF
6765 #define $ac_tr_hdr 1
6766 EOF
6767 }
6768  
6769 else
6770   echo "$ac_t""no" 1>&6
6771 fi
6772 done
6773
6774
6775     for ac_func in XRegisterIMInstantiateCallback
6776 do
6777 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6778 echo "configure:6779: checking for $ac_func" >&5
6779
6780 cat > conftest.$ac_ext <<EOF
6781 #line 6782 "configure"
6782 #include "confdefs.h"
6783 /* System header to define __stub macros and hopefully few prototypes,
6784     which can conflict with char $ac_func(); below.  */
6785 #include <assert.h>
6786 /* Override any gcc2 internal prototype to avoid an error.  */
6787 /* We use char because int might match the return type of a gcc2
6788     builtin and then its argument prototype would still apply.  */
6789 char $ac_func();
6790
6791 int main() {
6792
6793 /* The GNU C library defines this for functions which it implements
6794     to always fail with ENOSYS.  Some functions are actually named
6795     something starting with __ and the normal name is an alias.  */
6796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6797 choke me
6798 #else
6799 $ac_func();
6800 #endif
6801
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_func_$ac_func=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_func_$ac_func=no"
6812 fi
6813 rm -f conftest*
6814
6815 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6816   echo "$ac_t""yes" 1>&6
6817     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6818   { test "$extra_verbose" = "yes" && cat << EOF
6819     Defining $ac_tr_func
6820 EOF
6821 cat >> confdefs.h <<EOF
6822 #define $ac_tr_func 1
6823 EOF
6824 }
6825  
6826 else
6827   echo "$ac_t""no" 1>&6
6828 fi
6829 done
6830
6831   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6832 echo "configure:6833: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6833   cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836
6837 #define NeedFunctionPrototypes 1
6838 #include <X11/Xlib.h>
6839 extern Bool XRegisterIMInstantiateCallback(
6840    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6841
6842 int main() {
6843
6844 ; return 0; }
6845 EOF
6846 if { (eval echo configure:6847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6847   rm -rf conftest*
6848   echo "$ac_t""yes" 1>&6
6849 else
6850   echo "configure: failed program was:" >&5
6851   cat conftest.$ac_ext >&5
6852   rm -rf conftest*
6853   echo "$ac_t""no" 1>&6
6854    { test "$extra_verbose" = "yes" && cat << \EOF
6855     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6856 EOF
6857 cat >> confdefs.h <<\EOF
6858 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6859 EOF
6860 }
6861
6862 fi
6863 rm -f conftest*
6864
6865     test -z "$with_xmu" && { 
6866 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6867 echo "configure:6868: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6868 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6869
6870 xe_check_libs=" -lXmu "
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 /* Override any gcc2 internal prototype to avoid an error.  */
6875 /* We use char because int might match the return type of a gcc2
6876     builtin and then its argument prototype would still apply.  */
6877 char XmuReadBitmapDataFromFile();
6878
6879 int main() {
6880 XmuReadBitmapDataFromFile()
6881 ; return 0; }
6882 EOF
6883 if { (eval echo configure:6884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6884   rm -rf conftest*
6885   eval "ac_cv_lib_$ac_lib_var=yes"
6886 else
6887   echo "configure: failed program was:" >&5
6888   cat conftest.$ac_ext >&5
6889   rm -rf conftest*
6890   eval "ac_cv_lib_$ac_lib_var=no"
6891 fi
6892 rm -f conftest*
6893 xe_check_libs=""
6894
6895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6896   echo "$ac_t""yes" 1>&6
6897   with_xmu=yes
6898 else
6899   echo "$ac_t""no" 1>&6
6900 with_xmu=no
6901 fi
6902
6903  }
6904   if test "$with_xmu" = "no"; then
6905     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6906    echo "    xemacs will be linked with \"xmu.o\""
6907  fi
6908   else
6909     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6910     { test "$extra_verbose" = "yes" && cat << \EOF
6911     Defining HAVE_XMU
6912 EOF
6913 cat >> confdefs.h <<\EOF
6914 #define HAVE_XMU 1
6915 EOF
6916 }
6917
6918   fi
6919
6920       
6921 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6922 echo "configure:6923: checking for main in -lXbsd" >&5
6923 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6924
6925 xe_check_libs=" -lXbsd "
6926 cat > conftest.$ac_ext <<EOF
6927 #line 6928 "configure"
6928 #include "confdefs.h"
6929
6930 int main() {
6931 main()
6932 ; return 0; }
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6935   rm -rf conftest*
6936   eval "ac_cv_lib_$ac_lib_var=yes"
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_lib_$ac_lib_var=no"
6942 fi
6943 rm -f conftest*
6944 xe_check_libs=""
6945
6946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6947   echo "$ac_t""yes" 1>&6
6948   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6949 else
6950   echo "$ac_t""no" 1>&6
6951 fi
6952
6953
6954
6955     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6956         if test "$GCC" = "yes"; then
6957       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6958       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6959     else
6960       case "$CC" in
6961         "xlc" ) CC="xlc_r" ;;
6962         "xlC" ) CC="xlC_r" ;;
6963         "cc"  ) CC="cc_r" ;;
6964       esac
6965     fi
6966   fi
6967
6968 fi 
6969 if test "$with_msw" != "no"; then
6970   echo "checking for MS-Windows" 1>&6
6971 echo "configure:6972: checking for MS-Windows" >&5
6972   
6973 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6974 echo "configure:6975: checking for main in -lgdi32" >&5
6975 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6976
6977 xe_check_libs=" -lgdi32 "
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981
6982 int main() {
6983 main()
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987   rm -rf conftest*
6988   eval "ac_cv_lib_$ac_lib_var=yes"
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993   eval "ac_cv_lib_$ac_lib_var=no"
6994 fi
6995 rm -f conftest*
6996 xe_check_libs=""
6997
6998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6999   echo "$ac_t""yes" 1>&6
7000   with_msw=yes
7001 else
7002   echo "$ac_t""no" 1>&6
7003 fi
7004
7005
7006   if test "$with_msw" = "yes"; then
7007     { test "$extra_verbose" = "yes" && cat << \EOF
7008     Defining HAVE_MS_WINDOWS
7009 EOF
7010 cat >> confdefs.h <<\EOF
7011 #define HAVE_MS_WINDOWS 1
7012 EOF
7013 }
7014
7015
7016         if test "$with_netinstall" = "yes"; then
7017       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7018       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7019       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7020     fi
7021
7022     install_pp="$blddir/lib-src/installexe.sh"
7023     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
7024     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7025     if test "$window_system" != x11; then
7026         window_system=msw
7027         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7028             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7029    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7030  fi
7031         test "$with_menubars"   != "no" && with_menubars=msw \
7032             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7033    echo "    xemacs will be linked with \"menubar-msw.o\""
7034  fi
7035         test "$with_toolbars"   != "no" && with_toolbars=msw \
7036             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7037    echo "    xemacs will be linked with \"toolbar-msw.o\""
7038  fi
7039         test "$with_dialogs"   != "no" && with_dialogs=msw \
7040             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7041    echo "    xemacs will be linked with \"dialog-msw.o\""
7042  fi
7043         test "$with_widgets"   != "no" && with_widgets=msw
7044     else
7045         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7046    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7047  fi
7048         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7049    echo "    xemacs will be linked with \"menubar-msw.o\""
7050  fi
7051         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"toolbar-msw.o\""
7053  fi
7054         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7055    echo "    xemacs will be linked with \"dialog-msw.o\""
7056  fi
7057     fi
7058         cat > conftest.$ac_ext <<EOF
7059 #line 7060 "configure"
7060 #include "confdefs.h"
7061 #include <fcntl.h>
7062     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7063 EOF
7064 if { (eval echo configure:7065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7065 then
7066   { test "$extra_verbose" = "yes" && cat << \EOF
7067     Defining HAVE_MSG_SELECT
7068 EOF
7069 cat >> confdefs.h <<\EOF
7070 #define HAVE_MSG_SELECT 1
7071 EOF
7072 }
7073
7074 else
7075   conftest_rc="$?"
7076   echo "configure: failed program was:" >&5
7077   cat conftest.$ac_ext >&5
7078 fi
7079 rm -fr conftest*
7080     with_file_coding=yes
7081     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
7082    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\""
7083  fi
7084   fi
7085 fi
7086
7087
7088
7089 test -z "$window_system" && window_system="none"
7090
7091 if test "$window_system" = "none"; then
7092   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7093   do
7094     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7095        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7096     fi
7097     eval "with_${feature}=no"
7098   done
7099 else
7100   test -z "$with_toolbars" && with_toolbars=yes
7101 fi
7102
7103 if test "$with_msw" != "yes"; then
7104   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7105   do
7106     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7107        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7108     fi
7109     eval "with_${feature}=no"
7110   done
7111 else
7112   :
7113 fi
7114
7115 if test "$with_x11" != "yes"; then
7116             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7117   do
7118     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7119        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7120     fi
7121     eval "with_${feature}=no"
7122   done
7123 fi
7124
7125 if test "$with_x11" = "yes"; then
7126   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7127 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7128 echo "configure:7129: checking for X11/extensions/shape.h" >&5
7129
7130 cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 #include <X11/extensions/shape.h>
7134 EOF
7135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7136 { (eval echo configure:7137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7138 if test -z "$ac_err"; then
7139   rm -rf conftest*
7140   eval "ac_cv_header_$ac_safe=yes"
7141 else
7142   echo "$ac_err" >&5
7143   echo "configure: failed program was:" >&5
7144   cat conftest.$ac_ext >&5
7145   rm -rf conftest*
7146   eval "ac_cv_header_$ac_safe=no"
7147 fi
7148 rm -f conftest*
7149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7150   echo "$ac_t""yes" 1>&6
7151   
7152    { test "$extra_verbose" = "yes" && cat << \EOF
7153     Defining HAVE_BALLOON_HELP
7154 EOF
7155 cat >> confdefs.h <<\EOF
7156 #define HAVE_BALLOON_HELP 1
7157 EOF
7158 }
7159
7160    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7161    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7162  fi
7163 else
7164   echo "$ac_t""no" 1>&6
7165 fi
7166
7167 fi
7168
7169 bitmapdir=
7170
7171 case "$window_system" in
7172   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7173   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7174   gtk  )
7175        HAVE_X_WINDOWS=no
7176        test "$with_gnome" = "yes" && echo "  Using GNOME."
7177        test "$with_gnome" = "no" && echo "  Using GTK."
7178        ;;
7179   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7180 esac
7181
7182 case "$x_libraries" in *X11R4* )
7183   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7184   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7185 esac
7186
7187 echo "checking for WM_COMMAND option" 1>&6
7188 echo "configure:7189: checking for WM_COMMAND option" >&5;
7189 if test "$with_wmcommand" != "no"; then
7190   { test "$extra_verbose" = "yes" && cat << \EOF
7191     Defining HAVE_WMCOMMAND
7192 EOF
7193 cat >> confdefs.h <<\EOF
7194 #define HAVE_WMCOMMAND 1
7195 EOF
7196 }
7197
7198 fi
7199
7200 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7201 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7202 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7203 echo "configure:7204: checking for X11/Xauth.h" >&5
7204
7205 cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 #include <X11/Xauth.h>
7209 EOF
7210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7211 { (eval echo configure:7212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7213 if test -z "$ac_err"; then
7214   rm -rf conftest*
7215   eval "ac_cv_header_$ac_safe=yes"
7216 else
7217   echo "$ac_err" >&5
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221   eval "ac_cv_header_$ac_safe=no"
7222 fi
7223 rm -f conftest*
7224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7225   echo "$ac_t""yes" 1>&6
7226   :
7227 else
7228   echo "$ac_t""no" 1>&6
7229 with_xauth=no
7230 fi
7231  }
7232 test -z "$with_xauth" && { 
7233 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7234 echo "configure:7235: checking for XauGetAuthByAddr in -lXau" >&5
7235 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7236
7237 xe_check_libs=" -lXau "
7238 cat > conftest.$ac_ext <<EOF
7239 #line 7240 "configure"
7240 #include "confdefs.h"
7241 /* Override any gcc2 internal prototype to avoid an error.  */
7242 /* We use char because int might match the return type of a gcc2
7243     builtin and then its argument prototype would still apply.  */
7244 char XauGetAuthByAddr();
7245
7246 int main() {
7247 XauGetAuthByAddr()
7248 ; return 0; }
7249 EOF
7250 if { (eval echo configure:7251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7251   rm -rf conftest*
7252   eval "ac_cv_lib_$ac_lib_var=yes"
7253 else
7254   echo "configure: failed program was:" >&5
7255   cat conftest.$ac_ext >&5
7256   rm -rf conftest*
7257   eval "ac_cv_lib_$ac_lib_var=no"
7258 fi
7259 rm -f conftest*
7260 xe_check_libs=""
7261
7262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7263   echo "$ac_t""yes" 1>&6
7264   :
7265 else
7266   echo "$ac_t""no" 1>&6
7267 with_xauth=no
7268 fi
7269
7270  }
7271 test -z "$with_xauth" && with_xauth=yes
7272 if test "$with_xauth" = "yes"; then
7273   { test "$extra_verbose" = "yes" && cat << \EOF
7274     Defining HAVE_XAUTH
7275 EOF
7276 cat >> confdefs.h <<\EOF
7277 #define HAVE_XAUTH 1
7278 EOF
7279 }
7280
7281   
7282 T=""
7283 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
7284 libs_xauth="$T"
7285
7286 fi
7287
7288
7289
7290
7291 if test "$with_tooltalk" != "no" ; then
7292       for dir in "" "Tt/" "desktop/" ; do
7293     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7294 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7295 echo "configure:7296: checking for ${dir}tt_c.h" >&5
7296
7297 cat > conftest.$ac_ext <<EOF
7298 #line 7299 "configure"
7299 #include "confdefs.h"
7300 #include <${dir}tt_c.h>
7301 EOF
7302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7303 { (eval echo configure:7304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7305 if test -z "$ac_err"; then
7306   rm -rf conftest*
7307   eval "ac_cv_header_$ac_safe=yes"
7308 else
7309   echo "$ac_err" >&5
7310   echo "configure: failed program was:" >&5
7311   cat conftest.$ac_ext >&5
7312   rm -rf conftest*
7313   eval "ac_cv_header_$ac_safe=no"
7314 fi
7315 rm -f conftest*
7316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7317   echo "$ac_t""yes" 1>&6
7318   tt_c_h_file="${dir}tt_c.h"; break
7319 else
7320   echo "$ac_t""no" 1>&6
7321 fi
7322
7323   done
7324   if test -z "$tt_c_h_file"; then
7325     if test "$with_tooltalk" = "yes"; then
7326       (echo "$progname: Usage error:"
7327 echo " " "Unable to find required tooltalk header files."
7328 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7329     fi
7330     with_tooltalk=no
7331   fi
7332 fi
7333 if test "$with_tooltalk" != "no" ; then
7334   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7335     
7336 xe_msg_checking="for tt_message_create in -ltt"
7337 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7338 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7339 echo "configure:7340: checking "$xe_msg_checking"" >&5
7340 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7341
7342 xe_check_libs=" -ltt $extra_libs"
7343 cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 /* Override any gcc2 internal prototype to avoid an error.  */
7347 /* We use char because int might match the return type of a gcc2
7348     builtin and then its argument prototype would still apply.  */
7349 char tt_message_create();
7350
7351 int main() {
7352 tt_message_create()
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7356   rm -rf conftest*
7357   eval "ac_cv_lib_$ac_lib_var=yes"
7358 else
7359   echo "configure: failed program was:" >&5
7360   cat conftest.$ac_ext >&5
7361   rm -rf conftest*
7362   eval "ac_cv_lib_$ac_lib_var=no"
7363 fi
7364 rm -f conftest*
7365 xe_check_libs=""
7366
7367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7368   echo "$ac_t""yes" 1>&6
7369   tt_libs="-ltt $extra_libs"; break
7370 else
7371   echo "$ac_t""no" 1>&6
7372 :
7373 fi
7374
7375
7376   done
7377   if test -z "$tt_libs"; then
7378     if test "$with_tooltalk" = "yes"; then
7379       (echo "$progname: Usage error:"
7380 echo " " "Unable to find required tooltalk libraries."
7381 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7382     fi
7383     with_tooltalk=no
7384   fi
7385 fi
7386 test -z "$with_tooltalk" && with_tooltalk=yes
7387 if test "$with_tooltalk" = "yes"; then
7388   { test "$extra_verbose" = "yes" && cat << \EOF
7389     Defining TOOLTALK
7390 EOF
7391 cat >> confdefs.h <<\EOF
7392 #define TOOLTALK 1
7393 EOF
7394 }
7395
7396   { test "$extra_verbose" = "yes" && cat << EOF
7397     Defining TT_C_H_FILE = "$tt_c_h_file"
7398 EOF
7399 cat >> confdefs.h <<EOF
7400 #define TT_C_H_FILE "$tt_c_h_file"
7401 EOF
7402 }
7403
7404   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7405   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7406    echo "    xemacs will be linked with \"tooltalk.o\""
7407  fi
7408 fi
7409
7410 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7411 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7412 echo "configure:7413: checking for Dt/Dt.h" >&5
7413
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 #include <Dt/Dt.h>
7418 EOF
7419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7420 { (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7422 if test -z "$ac_err"; then
7423   rm -rf conftest*
7424   eval "ac_cv_header_$ac_safe=yes"
7425 else
7426   echo "$ac_err" >&5
7427   echo "configure: failed program was:" >&5
7428   cat conftest.$ac_ext >&5
7429   rm -rf conftest*
7430   eval "ac_cv_header_$ac_safe=no"
7431 fi
7432 rm -f conftest*
7433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7434   echo "$ac_t""yes" 1>&6
7435   :
7436 else
7437   echo "$ac_t""no" 1>&6
7438 with_cde=no
7439 fi
7440  }
7441 test -z "$with_cde" && { 
7442 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7443 echo "configure:7444: checking for DtDndDragStart in -lDtSvc" >&5
7444 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7445
7446 xe_check_libs=" -lDtSvc "
7447 cat > conftest.$ac_ext <<EOF
7448 #line 7449 "configure"
7449 #include "confdefs.h"
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 /* We use char because int might match the return type of a gcc2
7452     builtin and then its argument prototype would still apply.  */
7453 char DtDndDragStart();
7454
7455 int main() {
7456 DtDndDragStart()
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   eval "ac_cv_lib_$ac_lib_var=yes"
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=no"
7467 fi
7468 rm -f conftest*
7469 xe_check_libs=""
7470
7471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7472   echo "$ac_t""yes" 1>&6
7473   :
7474 else
7475   echo "$ac_t""no" 1>&6
7476 with_cde=no
7477 fi
7478
7479  }
7480 test -z "$with_cde" && with_cde=yes
7481 if test "$with_dragndrop" = no; then
7482   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7483   with_cde=no
7484 fi
7485 if test "$with_cde" = "yes" ; then
7486   { test "$extra_verbose" = "yes" && cat << \EOF
7487     Defining HAVE_CDE
7488 EOF
7489 cat >> confdefs.h <<\EOF
7490 #define HAVE_CDE 1
7491 EOF
7492 }
7493
7494   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7495   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7496   with_tooltalk=yes # CDE requires Tooltalk
7497   need_motif=yes    # CDE requires Motif
7498 fi
7499
7500 test "$window_system" != "x11" && with_offix=no
7501 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7502   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7503   with_offix=no
7504 fi
7505 if test "$with_dragndrop" = no; then
7506   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7507   with_offix=no
7508 fi
7509 if test "$with_cde" = yes; then
7510   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7511   with_offix=no
7512 fi
7513 test -z "$with_offix" && with_offix=no
7514 if test "$with_offix" = "yes"; then
7515   { test "$extra_verbose" = "yes" && cat << \EOF
7516     Defining HAVE_OFFIX_DND
7517 EOF
7518 cat >> confdefs.h <<\EOF
7519 #define HAVE_OFFIX_DND 1
7520 EOF
7521 }
7522
7523   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7524   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7525 fi
7526 if test "$with_gtk" = "yes"; then
7527    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7528 fi
7529
7530 if test "$with_dragndrop" != "no" ; then
7531   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7532 echo "configure:7533: checking if drag and drop API is needed" >&5
7533   if test -n "$dragndrop_proto" ; then
7534     with_dragndrop=yes
7535     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7536     { test "$extra_verbose" = "yes" && cat << \EOF
7537     Defining HAVE_DRAGNDROP
7538 EOF
7539 cat >> confdefs.h <<\EOF
7540 #define HAVE_DRAGNDROP 1
7541 EOF
7542 }
7543
7544     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7545   else
7546     with_dragndrop=no
7547     echo "$ac_t""no" 1>&6
7548   fi
7549 fi
7550
7551 echo "checking for LDAP" 1>&6
7552 echo "configure:7553: checking for LDAP" >&5
7553 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7554 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7555 echo "configure:7556: checking for ldap.h" >&5
7556
7557 cat > conftest.$ac_ext <<EOF
7558 #line 7559 "configure"
7559 #include "confdefs.h"
7560 #include <ldap.h>
7561 EOF
7562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7563 { (eval echo configure:7564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7565 if test -z "$ac_err"; then
7566   rm -rf conftest*
7567   eval "ac_cv_header_$ac_safe=yes"
7568 else
7569   echo "$ac_err" >&5
7570   echo "configure: failed program was:" >&5
7571   cat conftest.$ac_ext >&5
7572   rm -rf conftest*
7573   eval "ac_cv_header_$ac_safe=no"
7574 fi
7575 rm -f conftest*
7576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7577   echo "$ac_t""yes" 1>&6
7578   :
7579 else
7580   echo "$ac_t""no" 1>&6
7581 with_ldap=no
7582 fi
7583  }
7584 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7585 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7586 echo "configure:7587: checking for lber.h" >&5
7587
7588 cat > conftest.$ac_ext <<EOF
7589 #line 7590 "configure"
7590 #include "confdefs.h"
7591 #include <lber.h>
7592 EOF
7593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7594 { (eval echo configure:7595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7596 if test -z "$ac_err"; then
7597   rm -rf conftest*
7598   eval "ac_cv_header_$ac_safe=yes"
7599 else
7600   echo "$ac_err" >&5
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_header_$ac_safe=no"
7605 fi
7606 rm -f conftest*
7607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7608   echo "$ac_t""yes" 1>&6
7609   :
7610 else
7611   echo "$ac_t""no" 1>&6
7612 with_ldap=no
7613 fi
7614  }
7615 if test "$with_ldap" != "no"; then
7616   
7617 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7618 echo "configure:7619: checking for ldap_search in -lldap" >&5
7619 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7620
7621 xe_check_libs=" -lldap "
7622 cat > conftest.$ac_ext <<EOF
7623 #line 7624 "configure"
7624 #include "confdefs.h"
7625 /* Override any gcc2 internal prototype to avoid an error.  */
7626 /* We use char because int might match the return type of a gcc2
7627     builtin and then its argument prototype would still apply.  */
7628 char ldap_search();
7629
7630 int main() {
7631 ldap_search()
7632 ; return 0; }
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7635   rm -rf conftest*
7636   eval "ac_cv_lib_$ac_lib_var=yes"
7637 else
7638   echo "configure: failed program was:" >&5
7639   cat conftest.$ac_ext >&5
7640   rm -rf conftest*
7641   eval "ac_cv_lib_$ac_lib_var=no"
7642 fi
7643 rm -f conftest*
7644 xe_check_libs=""
7645
7646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7647   echo "$ac_t""yes" 1>&6
7648   with_ldap_nolber=yes
7649 else
7650   echo "$ac_t""no" 1>&6
7651 with_ldap_nolber=no
7652 fi
7653
7654
7655   test "$with_ldap_nolber" = "no" && { 
7656 xe_msg_checking="for ldap_open in -lldap"
7657 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7658 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7659 echo "configure:7660: checking "$xe_msg_checking"" >&5
7660 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7661
7662 xe_check_libs=" -lldap -llber"
7663 cat > conftest.$ac_ext <<EOF
7664 #line 7665 "configure"
7665 #include "confdefs.h"
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 /* We use char because int might match the return type of a gcc2
7668     builtin and then its argument prototype would still apply.  */
7669 char ldap_open();
7670
7671 int main() {
7672 ldap_open()
7673 ; return 0; }
7674 EOF
7675 if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=yes"
7678 else
7679   echo "configure: failed program was:" >&5
7680   cat conftest.$ac_ext >&5
7681   rm -rf conftest*
7682   eval "ac_cv_lib_$ac_lib_var=no"
7683 fi
7684 rm -f conftest*
7685 xe_check_libs=""
7686
7687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7688   echo "$ac_t""yes" 1>&6
7689   with_ldap_lber=yes
7690 else
7691   echo "$ac_t""no" 1>&6
7692 with_ldap_lber=no
7693 fi
7694
7695  }
7696   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7697 xe_msg_checking="for ldap_open in -lldap"
7698 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7699 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7700 echo "configure:7701: checking "$xe_msg_checking"" >&5
7701 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7702
7703 xe_check_libs=" -lldap -llber -lkrb"
7704 cat > conftest.$ac_ext <<EOF
7705 #line 7706 "configure"
7706 #include "confdefs.h"
7707 /* Override any gcc2 internal prototype to avoid an error.  */
7708 /* We use char because int might match the return type of a gcc2
7709     builtin and then its argument prototype would still apply.  */
7710 char ldap_open();
7711
7712 int main() {
7713 ldap_open()
7714 ; return 0; }
7715 EOF
7716 if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7717   rm -rf conftest*
7718   eval "ac_cv_lib_$ac_lib_var=yes"
7719 else
7720   echo "configure: failed program was:" >&5
7721   cat conftest.$ac_ext >&5
7722   rm -rf conftest*
7723   eval "ac_cv_lib_$ac_lib_var=no"
7724 fi
7725 rm -f conftest*
7726 xe_check_libs=""
7727
7728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7729   echo "$ac_t""yes" 1>&6
7730   with_ldap_krb=yes
7731 else
7732   echo "$ac_t""no" 1>&6
7733 with_ldap_krb=no
7734 fi
7735
7736  }
7737   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7738 xe_msg_checking="for ldap_open in -lldap"
7739 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7740 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7741 echo "configure:7742: checking "$xe_msg_checking"" >&5
7742 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7743
7744 xe_check_libs=" -lldap -llber -lkrb -ldes"
7745 cat > conftest.$ac_ext <<EOF
7746 #line 7747 "configure"
7747 #include "confdefs.h"
7748 /* Override any gcc2 internal prototype to avoid an error.  */
7749 /* We use char because int might match the return type of a gcc2
7750     builtin and then its argument prototype would still apply.  */
7751 char ldap_open();
7752
7753 int main() {
7754 ldap_open()
7755 ; return 0; }
7756 EOF
7757 if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7758   rm -rf conftest*
7759   eval "ac_cv_lib_$ac_lib_var=yes"
7760 else
7761   echo "configure: failed program was:" >&5
7762   cat conftest.$ac_ext >&5
7763   rm -rf conftest*
7764   eval "ac_cv_lib_$ac_lib_var=no"
7765 fi
7766 rm -f conftest*
7767 xe_check_libs=""
7768
7769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7770   echo "$ac_t""yes" 1>&6
7771   with_ldap_krbdes=yes
7772 else
7773   echo "$ac_t""no" 1>&6
7774 with_ldap_krbdes=no
7775 fi
7776
7777  }
7778   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
7779 fi
7780 if test "$with_ldap" = "yes"; then
7781   { test "$extra_verbose" = "yes" && cat << \EOF
7782     Defining HAVE_LDAP
7783 EOF
7784 cat >> confdefs.h <<\EOF
7785 #define HAVE_LDAP 1
7786 EOF
7787 }
7788
7789   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7790    echo "    xemacs will be linked with \"eldap.o\""
7791  fi
7792   if test "$with_ldap_nolber" = "yes" ; then
7793     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7794   else
7795     if test "$with_ldap_krb" = "yes" ; then
7796       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7797     fi
7798     if test "$with_ldap_krbdes" = "yes" ; then
7799       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7800       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7801     fi
7802     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7803     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7804   fi
7805   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7806 do
7807 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7808 echo "configure:7809: checking for $ac_func" >&5
7809
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 /* System header to define __stub macros and hopefully few prototypes,
7814     which can conflict with char $ac_func(); below.  */
7815 #include <assert.h>
7816 /* Override any gcc2 internal prototype to avoid an error.  */
7817 /* We use char because int might match the return type of a gcc2
7818     builtin and then its argument prototype would still apply.  */
7819 char $ac_func();
7820
7821 int main() {
7822
7823 /* The GNU C library defines this for functions which it implements
7824     to always fail with ENOSYS.  Some functions are actually named
7825     something starting with __ and the normal name is an alias.  */
7826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7827 choke me
7828 #else
7829 $ac_func();
7830 #endif
7831
7832 ; return 0; }
7833 EOF
7834 if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7835   rm -rf conftest*
7836   eval "ac_cv_func_$ac_func=yes"
7837 else
7838   echo "configure: failed program was:" >&5
7839   cat conftest.$ac_ext >&5
7840   rm -rf conftest*
7841   eval "ac_cv_func_$ac_func=no"
7842 fi
7843 rm -f conftest*
7844
7845 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7846   echo "$ac_t""yes" 1>&6
7847     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7848   { test "$extra_verbose" = "yes" && cat << EOF
7849     Defining $ac_tr_func
7850 EOF
7851 cat >> confdefs.h <<EOF
7852 #define $ac_tr_func 1
7853 EOF
7854 }
7855  
7856 else
7857   echo "$ac_t""no" 1>&6
7858 fi
7859 done
7860
7861 fi
7862
7863 if test "$with_postgresql" != "no"; then
7864   echo "checking for PostgreSQL" 1>&6
7865 echo "configure:7866: checking for PostgreSQL" >&5
7866
7867   for header_dir in "" "pgsql/" "postgresql/"; do
7868     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7869 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7870 echo "configure:7871: checking for ${header_dir}libpq-fe.h" >&5
7871
7872 cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <${header_dir}libpq-fe.h>
7876 EOF
7877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7878 { (eval echo configure:7879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7880 if test -z "$ac_err"; then
7881   rm -rf conftest*
7882   eval "ac_cv_header_$ac_safe=yes"
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   eval "ac_cv_header_$ac_safe=no"
7889 fi
7890 rm -f conftest*
7891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7892   echo "$ac_t""yes" 1>&6
7893   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7894 else
7895   echo "$ac_t""no" 1>&6
7896 fi
7897
7898   done
7899
7900   test -n "$libpq_fe_h_file" && { 
7901 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7902 echo "configure:7903: checking for PQconnectdb in -lpq" >&5
7903 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7904
7905 xe_check_libs=" -lpq "
7906 cat > conftest.$ac_ext <<EOF
7907 #line 7908 "configure"
7908 #include "confdefs.h"
7909 /* Override any gcc2 internal prototype to avoid an error.  */
7910 /* We use char because int might match the return type of a gcc2
7911     builtin and then its argument prototype would still apply.  */
7912 char PQconnectdb();
7913
7914 int main() {
7915 PQconnectdb()
7916 ; return 0; }
7917 EOF
7918 if { (eval echo configure:7919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7919   rm -rf conftest*
7920   eval "ac_cv_lib_$ac_lib_var=yes"
7921 else
7922   echo "configure: failed program was:" >&5
7923   cat conftest.$ac_ext >&5
7924   rm -rf conftest*
7925   eval "ac_cv_lib_$ac_lib_var=no"
7926 fi
7927 rm -f conftest*
7928 xe_check_libs=""
7929
7930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7931   echo "$ac_t""yes" 1>&6
7932   have_libpq=yes
7933 else
7934   echo "$ac_t""no" 1>&6
7935 fi
7936
7937  }
7938
7939   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7940     with_postgresql=yes
7941     { test "$extra_verbose" = "yes" && cat << \EOF
7942     Defining HAVE_POSTGRESQL
7943 EOF
7944 cat >> confdefs.h <<\EOF
7945 #define HAVE_POSTGRESQL 1
7946 EOF
7947 }
7948
7949     
7950 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7951 echo "configure:7952: checking for PQconnectStart in -lpq" >&5
7952 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7953
7954 xe_check_libs=" -lpq "
7955 cat > conftest.$ac_ext <<EOF
7956 #line 7957 "configure"
7957 #include "confdefs.h"
7958 /* Override any gcc2 internal prototype to avoid an error.  */
7959 /* We use char because int might match the return type of a gcc2
7960     builtin and then its argument prototype would still apply.  */
7961 char PQconnectStart();
7962
7963 int main() {
7964 PQconnectStart()
7965 ; return 0; }
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=yes"
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=no"
7975 fi
7976 rm -f conftest*
7977 xe_check_libs=""
7978
7979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7980   echo "$ac_t""yes" 1>&6
7981   with_postgresqlv7=yes;
7982                  { test "$extra_verbose" = "yes" && cat << \EOF
7983     Defining HAVE_POSTGRESQLV7
7984 EOF
7985 cat >> confdefs.h <<\EOF
7986 #define HAVE_POSTGRESQLV7 1
7987 EOF
7988 }
7989
7990 else
7991   echo "$ac_t""no" 1>&6
7992 fi
7993
7994
7995     { test "$extra_verbose" = "yes" && cat << EOF
7996     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7997 EOF
7998 cat >> confdefs.h <<EOF
7999 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8000 EOF
8001 }
8002
8003     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8004     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8005    echo "    xemacs will be linked with \"postgresql.o\""
8006  fi
8007   elif test "$with_postgresql" = "yes"; then
8008     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8009   fi
8010 fi
8011
8012
8013 if test "$window_system" != "none"; then
8014   echo "checking for graphics libraries" 1>&6
8015 echo "configure:8016: checking for graphics libraries" >&5
8016
8017     xpm_problem=""
8018   if test -z "$with_xpm"; then
8019     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8020 echo "configure:8021: checking for Xpm - no older than 3.4f" >&5
8021     xe_check_libs=-lXpm
8022     cat > conftest.$ac_ext <<EOF
8023 #line 8024 "configure"
8024 #include "confdefs.h"
8025 #define XPM_NUMBERS
8026 #include <X11/xpm.h>
8027     int main(int c, char **v) {
8028     return c == 1 ? 0 :
8029       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8030       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8031 EOF
8032 if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8033 then
8034   ./conftest dummy_arg; xpm_status=$?;
8035       if test "$xpm_status" = "0"; then
8036         with_xpm=yes;
8037       else
8038         with_xpm=no;
8039         if test "$xpm_status" = "1"; then
8040           xpm_problem="Xpm library version and header file version don't match!"
8041         elif test "$xpm_status" = "2"; then
8042           xpm_problem="Xpm library version is too old!"
8043         else
8044           xpm_problem="Internal xpm detection logic error!"
8045         fi
8046         echo "
8047 *** WARNING *** $xpm_problem
8048   I'm not touching that with a 10-foot pole!
8049   If you really want to use the installed version of Xpm, rerun
8050   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8051     fi
8052 else
8053   conftest_rc="$?"
8054   echo "configure: failed program was:" >&5
8055   cat conftest.$ac_ext >&5
8056   rm -fr conftest*
8057   with_xpm=no
8058 fi
8059 rm -fr conftest*
8060     xe_check_libs=
8061     echo "$ac_t""$with_xpm" 1>&6
8062   fi
8063   if test "$with_xpm" = "yes"; then
8064                 { test "$extra_verbose" = "yes" && cat << \EOF
8065     Defining HAVE_XPM
8066 EOF
8067 cat >> confdefs.h <<\EOF
8068 #define HAVE_XPM 1
8069 EOF
8070 }
8071
8072     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8073     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8074 echo "configure:8075: checking for \"FOR_MSW\" xpm" >&5
8075     xe_check_libs=-lXpm
8076     cat > conftest.$ac_ext <<EOF
8077 #line 8078 "configure"
8078 #include "confdefs.h"
8079
8080 int main() {
8081 XpmCreatePixmapFromData()
8082 ; return 0; }
8083 EOF
8084 if { (eval echo configure:8085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8085   rm -rf conftest*
8086   xpm_for_msw=no
8087 else
8088   echo "configure: failed program was:" >&5
8089   cat conftest.$ac_ext >&5
8090   rm -rf conftest*
8091   xpm_for_msw=yes
8092 fi
8093 rm -f conftest*
8094     xe_check_libs=
8095     echo "$ac_t""$xpm_for_msw" 1>&6
8096     if test "$xpm_for_msw" = "yes"; then
8097       { test "$extra_verbose" = "yes" && cat << \EOF
8098     Defining FOR_MSW
8099 EOF
8100 cat >> confdefs.h <<\EOF
8101 #define FOR_MSW 1
8102 EOF
8103 }
8104
8105     fi
8106   fi
8107
8108     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8109 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8110 echo "configure:8111: checking for compface.h" >&5
8111
8112 cat > conftest.$ac_ext <<EOF
8113 #line 8114 "configure"
8114 #include "confdefs.h"
8115 #include <compface.h>
8116 EOF
8117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8118 { (eval echo configure:8119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8120 if test -z "$ac_err"; then
8121   rm -rf conftest*
8122   eval "ac_cv_header_$ac_safe=yes"
8123 else
8124   echo "$ac_err" >&5
8125   echo "configure: failed program was:" >&5
8126   cat conftest.$ac_ext >&5
8127   rm -rf conftest*
8128   eval "ac_cv_header_$ac_safe=no"
8129 fi
8130 rm -f conftest*
8131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8132   echo "$ac_t""yes" 1>&6
8133   :
8134 else
8135   echo "$ac_t""no" 1>&6
8136 with_xface=no
8137 fi
8138  }
8139   test -z "$with_xface" && { 
8140 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8141 echo "configure:8142: checking for UnGenFace in -lcompface" >&5
8142 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8143
8144 xe_check_libs=" -lcompface "
8145 cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* Override any gcc2 internal prototype to avoid an error.  */
8149 /* We use char because int might match the return type of a gcc2
8150     builtin and then its argument prototype would still apply.  */
8151 char UnGenFace();
8152
8153 int main() {
8154 UnGenFace()
8155 ; return 0; }
8156 EOF
8157 if { (eval echo configure:8158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8158   rm -rf conftest*
8159   eval "ac_cv_lib_$ac_lib_var=yes"
8160 else
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   eval "ac_cv_lib_$ac_lib_var=no"
8165 fi
8166 rm -f conftest*
8167 xe_check_libs=""
8168
8169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8170   echo "$ac_t""yes" 1>&6
8171   : 
8172 else
8173   echo "$ac_t""no" 1>&6
8174 with_xface=no
8175 fi
8176
8177  }
8178   test -z "$with_xface" && with_xface=yes
8179   if test "$with_xface" = "yes"; then
8180     { test "$extra_verbose" = "yes" && cat << \EOF
8181     Defining HAVE_XFACE
8182 EOF
8183 cat >> confdefs.h <<\EOF
8184 #define HAVE_XFACE 1
8185 EOF
8186 }
8187
8188     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8189   fi
8190
8191         if test "$with_gif" != "no"; then
8192     with_gif="yes"
8193     { test "$extra_verbose" = "yes" && cat << \EOF
8194     Defining HAVE_GIF
8195 EOF
8196 cat >> confdefs.h <<\EOF
8197 #define HAVE_GIF 1
8198 EOF
8199 }
8200
8201     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8202    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8203  fi
8204   fi
8205
8206       if test "$with_png $with_tiff" != "no no"; then
8207     
8208 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8209 echo "configure:8210: checking for inflate in -lc" >&5
8210 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8211
8212 xe_check_libs=" -lc "
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* Override any gcc2 internal prototype to avoid an error.  */
8217 /* We use char because int might match the return type of a gcc2
8218     builtin and then its argument prototype would still apply.  */
8219 char inflate();
8220
8221 int main() {
8222 inflate()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 xe_check_libs=""
8236
8237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8238   echo "$ac_t""yes" 1>&6
8239   :
8240 else
8241   echo "$ac_t""no" 1>&6
8242
8243 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8244 echo "configure:8245: checking for inflate in -lz" >&5
8245 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8246
8247 xe_check_libs=" -lz "
8248 cat > conftest.$ac_ext <<EOF
8249 #line 8250 "configure"
8250 #include "confdefs.h"
8251 /* Override any gcc2 internal prototype to avoid an error.  */
8252 /* We use char because int might match the return type of a gcc2
8253     builtin and then its argument prototype would still apply.  */
8254 char inflate();
8255
8256 int main() {
8257 inflate()
8258 ; return 0; }
8259 EOF
8260 if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8261   rm -rf conftest*
8262   eval "ac_cv_lib_$ac_lib_var=yes"
8263 else
8264   echo "configure: failed program was:" >&5
8265   cat conftest.$ac_ext >&5
8266   rm -rf conftest*
8267   eval "ac_cv_lib_$ac_lib_var=no"
8268 fi
8269 rm -f conftest*
8270 xe_check_libs=""
8271
8272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8273   echo "$ac_t""yes" 1>&6
8274   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8275 else
8276   echo "$ac_t""no" 1>&6
8277
8278 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8279 echo "configure:8280: checking for inflate in -lgz" >&5
8280 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8281
8282 xe_check_libs=" -lgz "
8283 cat > conftest.$ac_ext <<EOF
8284 #line 8285 "configure"
8285 #include "confdefs.h"
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 /* We use char because int might match the return type of a gcc2
8288     builtin and then its argument prototype would still apply.  */
8289 char inflate();
8290
8291 int main() {
8292 inflate()
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   eval "ac_cv_lib_$ac_lib_var=yes"
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=no"
8303 fi
8304 rm -f conftest*
8305 xe_check_libs=""
8306
8307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8308   echo "$ac_t""yes" 1>&6
8309   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8310 else
8311   echo "$ac_t""no" 1>&6
8312 fi
8313
8314
8315 fi
8316
8317
8318 fi
8319
8320
8321   fi
8322
8323     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8324 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8325 echo "configure:8326: checking for jpeglib.h" >&5
8326
8327 cat > conftest.$ac_ext <<EOF
8328 #line 8329 "configure"
8329 #include "confdefs.h"
8330 #include <jpeglib.h>
8331 EOF
8332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8333 { (eval echo configure:8334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8335 if test -z "$ac_err"; then
8336   rm -rf conftest*
8337   eval "ac_cv_header_$ac_safe=yes"
8338 else
8339   echo "$ac_err" >&5
8340   echo "configure: failed program was:" >&5
8341   cat conftest.$ac_ext >&5
8342   rm -rf conftest*
8343   eval "ac_cv_header_$ac_safe=no"
8344 fi
8345 rm -f conftest*
8346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8347   echo "$ac_t""yes" 1>&6
8348   :
8349 else
8350   echo "$ac_t""no" 1>&6
8351 with_jpeg=no
8352 fi
8353  }
8354   test -z "$with_jpeg" && { 
8355 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8356 echo "configure:8357: checking for jpeg_destroy_decompress in -ljpeg" >&5
8357 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8358
8359 xe_check_libs=" -ljpeg "
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char jpeg_destroy_decompress();
8367
8368 int main() {
8369 jpeg_destroy_decompress()
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   eval "ac_cv_lib_$ac_lib_var=yes"
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=no"
8380 fi
8381 rm -f conftest*
8382 xe_check_libs=""
8383
8384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8385   echo "$ac_t""yes" 1>&6
8386   :
8387 else
8388   echo "$ac_t""no" 1>&6
8389 with_jpeg=no
8390 fi
8391
8392  }
8393   test -z "$with_jpeg" && with_jpeg=yes
8394   if test "$with_jpeg" = "yes"; then
8395     { test "$extra_verbose" = "yes" && cat << \EOF
8396     Defining HAVE_JPEG
8397 EOF
8398 cat >> confdefs.h <<\EOF
8399 #define HAVE_JPEG 1
8400 EOF
8401 }
8402
8403     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8404   fi
8405
8406     png_problem=""
8407   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8408 echo "configure:8409: checking for pow" >&5
8409
8410 cat > conftest.$ac_ext <<EOF
8411 #line 8412 "configure"
8412 #include "confdefs.h"
8413 /* System header to define __stub macros and hopefully few prototypes,
8414     which can conflict with char pow(); below.  */
8415 #include <assert.h>
8416 /* Override any gcc2 internal prototype to avoid an error.  */
8417 /* We use char because int might match the return type of a gcc2
8418     builtin and then its argument prototype would still apply.  */
8419 char pow();
8420
8421 int main() {
8422
8423 /* The GNU C library defines this for functions which it implements
8424     to always fail with ENOSYS.  Some functions are actually named
8425     something starting with __ and the normal name is an alias.  */
8426 #if defined (__stub_pow) || defined (__stub___pow)
8427 choke me
8428 #else
8429 pow();
8430 #endif
8431
8432 ; return 0; }
8433 EOF
8434 if { (eval echo configure:8435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8435   rm -rf conftest*
8436   eval "ac_cv_func_pow=yes"
8437 else
8438   echo "configure: failed program was:" >&5
8439   cat conftest.$ac_ext >&5
8440   rm -rf conftest*
8441   eval "ac_cv_func_pow=no"
8442 fi
8443 rm -f conftest*
8444
8445 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8446   echo "$ac_t""yes" 1>&6
8447   :
8448 else
8449   echo "$ac_t""no" 1>&6
8450 with_png=no
8451 fi
8452  }
8453   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8454 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8455 echo "configure:8456: checking for png.h" >&5
8456
8457 cat > conftest.$ac_ext <<EOF
8458 #line 8459 "configure"
8459 #include "confdefs.h"
8460 #include <png.h>
8461 EOF
8462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8463 { (eval echo configure:8464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8465 if test -z "$ac_err"; then
8466   rm -rf conftest*
8467   eval "ac_cv_header_$ac_safe=yes"
8468 else
8469   echo "$ac_err" >&5
8470   echo "configure: failed program was:" >&5
8471   cat conftest.$ac_ext >&5
8472   rm -rf conftest*
8473   eval "ac_cv_header_$ac_safe=no"
8474 fi
8475 rm -f conftest*
8476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8477   echo "$ac_t""yes" 1>&6
8478   :
8479 else
8480   echo "$ac_t""no" 1>&6
8481 with_png=no
8482 fi
8483  }
8484   test -z "$with_png" && { 
8485 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8486 echo "configure:8487: checking for png_read_image in -lpng" >&5
8487 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8488
8489 xe_check_libs=" -lpng "
8490 cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493 /* Override any gcc2 internal prototype to avoid an error.  */
8494 /* We use char because int might match the return type of a gcc2
8495     builtin and then its argument prototype would still apply.  */
8496 char png_read_image();
8497
8498 int main() {
8499 png_read_image()
8500 ; return 0; }
8501 EOF
8502 if { (eval echo configure:8503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8503   rm -rf conftest*
8504   eval "ac_cv_lib_$ac_lib_var=yes"
8505 else
8506   echo "configure: failed program was:" >&5
8507   cat conftest.$ac_ext >&5
8508   rm -rf conftest*
8509   eval "ac_cv_lib_$ac_lib_var=no"
8510 fi
8511 rm -f conftest*
8512 xe_check_libs=""
8513
8514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8515   echo "$ac_t""yes" 1>&6
8516   :
8517 else
8518   echo "$ac_t""no" 1>&6
8519 with_png=no
8520 fi
8521
8522  }
8523   if test -z "$with_png"; then
8524     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8525 echo "configure:8526: checking for workable png version information" >&5
8526     xe_check_libs="-lpng -lz"
8527     cat > conftest.$ac_ext <<EOF
8528 #line 8529 "configure"
8529 #include "confdefs.h"
8530 #include <png.h>
8531     int main(int c, char **v) {
8532     if (c == 1) return 0;
8533     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8534     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8537 then
8538   ./conftest dummy_arg; png_status=$?;
8539       if test "$png_status" = "0"; then
8540         with_png=yes;
8541       else
8542         with_png=no;
8543         if test "$png_status" = "1"; then
8544           png_problem="PNG library version and header file don't match!"
8545         elif test "$png_status" = "2"; then
8546           png_problem="PNG library version too old (pre 1.0.2)!"
8547         fi
8548         echo "
8549 *** WARNING *** $png_problem
8550   I'm not touching that with a 10-foot pole!
8551   If you really want to use the installed version of libPNG, rerun
8552   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8553     fi
8554 else
8555   conftest_rc="$?"
8556   echo "configure: failed program was:" >&5
8557   cat conftest.$ac_ext >&5
8558   rm -fr conftest*
8559   with_png=no
8560 fi
8561 rm -fr conftest*
8562     xe_check_libs=
8563     echo "$ac_t""$with_png" 1>&6
8564   fi
8565   if test "$with_png" = "yes"; then
8566     { test "$extra_verbose" = "yes" && cat << \EOF
8567     Defining HAVE_PNG
8568 EOF
8569 cat >> confdefs.h <<\EOF
8570 #define HAVE_PNG 1
8571 EOF
8572 }
8573
8574     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8575   fi
8576
8577     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8578 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8579 echo "configure:8580: checking for tiffio.h" >&5
8580
8581 cat > conftest.$ac_ext <<EOF
8582 #line 8583 "configure"
8583 #include "confdefs.h"
8584 #include <tiffio.h>
8585 EOF
8586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8587 { (eval echo configure:8588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8589 if test -z "$ac_err"; then
8590   rm -rf conftest*
8591   eval "ac_cv_header_$ac_safe=yes"
8592 else
8593   echo "$ac_err" >&5
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   eval "ac_cv_header_$ac_safe=no"
8598 fi
8599 rm -f conftest*
8600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8601   echo "$ac_t""yes" 1>&6
8602   :
8603 else
8604   echo "$ac_t""no" 1>&6
8605 with_tiff=no
8606 fi
8607  }
8608   test -z "$with_tiff" && { 
8609 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8610 echo "configure:8611: checking for TIFFClientOpen in -ltiff" >&5
8611 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8612
8613 xe_check_libs=" -ltiff "
8614 cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8617 /* Override any gcc2 internal prototype to avoid an error.  */
8618 /* We use char because int might match the return type of a gcc2
8619     builtin and then its argument prototype would still apply.  */
8620 char TIFFClientOpen();
8621
8622 int main() {
8623 TIFFClientOpen()
8624 ; return 0; }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8627   rm -rf conftest*
8628   eval "ac_cv_lib_$ac_lib_var=yes"
8629 else
8630   echo "configure: failed program was:" >&5
8631   cat conftest.$ac_ext >&5
8632   rm -rf conftest*
8633   eval "ac_cv_lib_$ac_lib_var=no"
8634 fi
8635 rm -f conftest*
8636 xe_check_libs=""
8637
8638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8639   echo "$ac_t""yes" 1>&6
8640   :
8641 else
8642   echo "$ac_t""no" 1>&6
8643 with_tiff=no
8644 fi
8645
8646  }
8647   test -z "$with_tiff" && with_tiff=yes
8648   if test "$with_tiff" = "yes"; then
8649     { test "$extra_verbose" = "yes" && cat << \EOF
8650     Defining HAVE_TIFF
8651 EOF
8652 cat >> confdefs.h <<\EOF
8653 #define HAVE_TIFF 1
8654 EOF
8655 }
8656
8657     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8658   fi
8659 fi
8660
8661
8662 if test "$with_gtk" = "yes"; then
8663     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8664 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8665 echo "configure:8666: checking for compface.h" >&5
8666
8667 cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 #include <compface.h>
8671 EOF
8672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8673 { (eval echo configure:8674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8675 if test -z "$ac_err"; then
8676   rm -rf conftest*
8677   eval "ac_cv_header_$ac_safe=yes"
8678 else
8679   echo "$ac_err" >&5
8680   echo "configure: failed program was:" >&5
8681   cat conftest.$ac_ext >&5
8682   rm -rf conftest*
8683   eval "ac_cv_header_$ac_safe=no"
8684 fi
8685 rm -f conftest*
8686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8687   echo "$ac_t""yes" 1>&6
8688   :
8689 else
8690   echo "$ac_t""no" 1>&6
8691 with_xface=no
8692 fi
8693  }
8694   test -z "$with_xface" && { 
8695 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8696 echo "configure:8697: checking for UnGenFace in -lcompface" >&5
8697 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8698
8699 xe_check_libs=" -lcompface "
8700 cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 /* Override any gcc2 internal prototype to avoid an error.  */
8704 /* We use char because int might match the return type of a gcc2
8705     builtin and then its argument prototype would still apply.  */
8706 char UnGenFace();
8707
8708 int main() {
8709 UnGenFace()
8710 ; return 0; }
8711 EOF
8712 if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=yes"
8715 else
8716   echo "configure: failed program was:" >&5
8717   cat conftest.$ac_ext >&5
8718   rm -rf conftest*
8719   eval "ac_cv_lib_$ac_lib_var=no"
8720 fi
8721 rm -f conftest*
8722 xe_check_libs=""
8723
8724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8725   echo "$ac_t""yes" 1>&6
8726   : 
8727 else
8728   echo "$ac_t""no" 1>&6
8729 with_xface=no
8730 fi
8731
8732  }
8733   test -z "$with_xface" && with_xface=yes
8734   if test "$with_xface" = "yes"; then
8735     { test "$extra_verbose" = "yes" && cat << \EOF
8736     Defining HAVE_XFACE
8737 EOF
8738 cat >> confdefs.h <<\EOF
8739 #define HAVE_XFACE 1
8740 EOF
8741 }
8742
8743     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8744   fi
8745 fi
8746
8747
8748
8749 if test "$with_x11" = "yes"; then
8750
8751   echo "checking for X11 graphics libraries" 1>&6
8752 echo "configure:8753: checking for X11 graphics libraries" >&5
8753
8754   echo "checking for the Athena widgets" 1>&6
8755 echo "configure:8756: checking for the Athena widgets" >&5
8756
8757     case "$with_athena" in
8758         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8759     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8760     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8761     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8762     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8763     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8764   esac
8765
8766     if test "$athena_3d" = "no"; then
8767     
8768 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8769 echo "configure:8770: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8770 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8771
8772 xe_check_libs=" -l$athena_variant "
8773 cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 /* Override any gcc2 internal prototype to avoid an error.  */
8777 /* We use char because int might match the return type of a gcc2
8778     builtin and then its argument prototype would still apply.  */
8779 char XawScrollbarSetThumb();
8780
8781 int main() {
8782 XawScrollbarSetThumb()
8783 ; return 0; }
8784 EOF
8785 if { (eval echo configure:8786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8786   rm -rf conftest*
8787   eval "ac_cv_lib_$ac_lib_var=yes"
8788 else
8789   echo "configure: failed program was:" >&5
8790   cat conftest.$ac_ext >&5
8791   rm -rf conftest*
8792   eval "ac_cv_lib_$ac_lib_var=no"
8793 fi
8794 rm -f conftest*
8795 xe_check_libs=""
8796
8797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8798   echo "$ac_t""yes" 1>&6
8799           
8800 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8801 echo "configure:8802: checking for threeDClassRec in -l$athena_variant" >&5
8802 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8803
8804 xe_check_libs=" -l$athena_variant "
8805 cat > conftest.$ac_ext <<EOF
8806 #line 8807 "configure"
8807 #include "confdefs.h"
8808 /* Override any gcc2 internal prototype to avoid an error.  */
8809 /* We use char because int might match the return type of a gcc2
8810     builtin and then its argument prototype would still apply.  */
8811 char threeDClassRec();
8812
8813 int main() {
8814 threeDClassRec()
8815 ; return 0; }
8816 EOF
8817 if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8818   rm -rf conftest*
8819   eval "ac_cv_lib_$ac_lib_var=yes"
8820 else
8821   echo "configure: failed program was:" >&5
8822   cat conftest.$ac_ext >&5
8823   rm -rf conftest*
8824   eval "ac_cv_lib_$ac_lib_var=no"
8825 fi
8826 rm -f conftest*
8827 xe_check_libs=""
8828
8829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8830   echo "$ac_t""yes" 1>&6
8831   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8832 else
8833   echo "$ac_t""no" 1>&6
8834 athena_lib=$athena_variant
8835 fi
8836
8837
8838       
8839 else
8840   echo "$ac_t""no" 1>&6
8841 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8842 fi
8843
8844
8845   else
8846         
8847 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8848 echo "configure:8849: checking for threeDClassRec in -l$athena_variant" >&5
8849 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8850
8851 xe_check_libs=" -l$athena_variant "
8852 cat > conftest.$ac_ext <<EOF
8853 #line 8854 "configure"
8854 #include "confdefs.h"
8855 /* Override any gcc2 internal prototype to avoid an error.  */
8856 /* We use char because int might match the return type of a gcc2
8857     builtin and then its argument prototype would still apply.  */
8858 char threeDClassRec();
8859
8860 int main() {
8861 threeDClassRec()
8862 ; return 0; }
8863 EOF
8864 if { (eval echo configure:8865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8865   rm -rf conftest*
8866   eval "ac_cv_lib_$ac_lib_var=yes"
8867 else
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_lib_$ac_lib_var=no"
8872 fi
8873 rm -f conftest*
8874 xe_check_libs=""
8875
8876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8877   echo "$ac_t""yes" 1>&6
8878   athena_lib=$athena_variant
8879 else
8880   echo "$ac_t""no" 1>&6
8881 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8882 echo "configure:8883: checking for threeDClassRec in -lXaw" >&5
8883 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8884
8885 xe_check_libs=" -lXaw "
8886 cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 /* Override any gcc2 internal prototype to avoid an error.  */
8890 /* We use char because int might match the return type of a gcc2
8891     builtin and then its argument prototype would still apply.  */
8892 char threeDClassRec();
8893
8894 int main() {
8895 threeDClassRec()
8896 ; return 0; }
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8899   rm -rf conftest*
8900   eval "ac_cv_lib_$ac_lib_var=yes"
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -rf conftest*
8905   eval "ac_cv_lib_$ac_lib_var=no"
8906 fi
8907 rm -f conftest*
8908 xe_check_libs=""
8909
8910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8911   echo "$ac_t""yes" 1>&6
8912   athena_lib=Xaw;
8913           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8914         
8915 else
8916   echo "$ac_t""no" 1>&6
8917 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8918 fi
8919
8920
8921 fi
8922
8923
8924   fi
8925
8926     if test "$athena_3d" = "no"; then
8927     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8928 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8929 echo "configure:8930: checking for X11/Xaw/ThreeD.h" >&5
8930
8931 cat > conftest.$ac_ext <<EOF
8932 #line 8933 "configure"
8933 #include "confdefs.h"
8934 #include <X11/Xaw/ThreeD.h>
8935 EOF
8936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8937 { (eval echo configure:8938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8939 if test -z "$ac_err"; then
8940   rm -rf conftest*
8941   eval "ac_cv_header_$ac_safe=yes"
8942 else
8943   echo "$ac_err" >&5
8944   echo "configure: failed program was:" >&5
8945   cat conftest.$ac_ext >&5
8946   rm -rf conftest*
8947   eval "ac_cv_header_$ac_safe=no"
8948 fi
8949 rm -f conftest*
8950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8951   echo "$ac_t""yes" 1>&6
8952   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8953 else
8954   echo "$ac_t""no" 1>&6
8955 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8956 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8957 echo "configure:8958: checking for X11/Xaw/XawInit.h" >&5
8958
8959 cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 #include <X11/Xaw/XawInit.h>
8963 EOF
8964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8965 { (eval echo configure:8966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8967 if test -z "$ac_err"; then
8968   rm -rf conftest*
8969   eval "ac_cv_header_$ac_safe=yes"
8970 else
8971   echo "$ac_err" >&5
8972   echo "configure: failed program was:" >&5
8973   cat conftest.$ac_ext >&5
8974   rm -rf conftest*
8975   eval "ac_cv_header_$ac_safe=no"
8976 fi
8977 rm -f conftest*
8978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8979   echo "$ac_t""yes" 1>&6
8980   athena_h_path=X11/Xaw
8981 else
8982   echo "$ac_t""no" 1>&6
8983 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8984 fi
8985
8986 fi
8987
8988   else
8989             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8990 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8991 echo "configure:8992: checking for X11/$athena_variant/XawInit.h" >&5
8992
8993 cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 #include <X11/$athena_variant/XawInit.h>
8997 EOF
8998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8999 { (eval echo configure:9000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9001 if test -z "$ac_err"; then
9002   rm -rf conftest*
9003   eval "ac_cv_header_$ac_safe=yes"
9004 else
9005   echo "$ac_err" >&5
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   eval "ac_cv_header_$ac_safe=no"
9010 fi
9011 rm -f conftest*
9012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9013   echo "$ac_t""yes" 1>&6
9014   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9015 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9016 echo "configure:9017: checking for X11/$athena_variant/ThreeD.h" >&5
9017
9018 cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 #include <X11/$athena_variant/ThreeD.h>
9022 EOF
9023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9024 { (eval echo configure:9025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9026 if test -z "$ac_err"; then
9027   rm -rf conftest*
9028   eval "ac_cv_header_$ac_safe=yes"
9029 else
9030   echo "$ac_err" >&5
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_header_$ac_safe=no"
9035 fi
9036 rm -f conftest*
9037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   athena_h_path=X11/$athena_variant
9040 else
9041   echo "$ac_t""no" 1>&6
9042 fi
9043
9044 else
9045   echo "$ac_t""no" 1>&6
9046 fi
9047
9048
9049         if test -z "$athena_h_path"; then
9050       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9051 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9052 echo "configure:9053: checking for $athena_variant/XawInit.h" >&5
9053
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 #include <$athena_variant/XawInit.h>
9058 EOF
9059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9060 { (eval echo configure:9061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9062 if test -z "$ac_err"; then
9063   rm -rf conftest*
9064   eval "ac_cv_header_$ac_safe=yes"
9065 else
9066   echo "$ac_err" >&5
9067   echo "configure: failed program was:" >&5
9068   cat conftest.$ac_ext >&5
9069   rm -rf conftest*
9070   eval "ac_cv_header_$ac_safe=no"
9071 fi
9072 rm -f conftest*
9073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9074   echo "$ac_t""yes" 1>&6
9075   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9076 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9077 echo "configure:9078: checking for $athena_variant/ThreeD.h" >&5
9078
9079 cat > conftest.$ac_ext <<EOF
9080 #line 9081 "configure"
9081 #include "confdefs.h"
9082 #include <$athena_variant/ThreeD.h>
9083 EOF
9084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9085 { (eval echo configure:9086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9087 if test -z "$ac_err"; then
9088   rm -rf conftest*
9089   eval "ac_cv_header_$ac_safe=yes"
9090 else
9091   echo "$ac_err" >&5
9092   echo "configure: failed program was:" >&5
9093   cat conftest.$ac_ext >&5
9094   rm -rf conftest*
9095   eval "ac_cv_header_$ac_safe=no"
9096 fi
9097 rm -f conftest*
9098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9099   echo "$ac_t""yes" 1>&6
9100   athena_h_path=$athena_variant
9101 else
9102   echo "$ac_t""no" 1>&6
9103 fi
9104
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109     fi
9110
9111         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9112       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9113 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9114 echo "configure:9115: checking for X11/Xaw3d/XawInit.h" >&5
9115
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119 #include <X11/Xaw3d/XawInit.h>
9120 EOF
9121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9122 { (eval echo configure:9123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9124 if test -z "$ac_err"; then
9125   rm -rf conftest*
9126   eval "ac_cv_header_$ac_safe=yes"
9127 else
9128   echo "$ac_err" >&5
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -rf conftest*
9132   eval "ac_cv_header_$ac_safe=no"
9133 fi
9134 rm -f conftest*
9135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9136   echo "$ac_t""yes" 1>&6
9137   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9138 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9139 echo "configure:9140: checking for X11/Xaw3d/ThreeD.h" >&5
9140
9141 cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 #include <X11/Xaw3d/ThreeD.h>
9145 EOF
9146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9147 { (eval echo configure:9148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9149 if test -z "$ac_err"; then
9150   rm -rf conftest*
9151   eval "ac_cv_header_$ac_safe=yes"
9152 else
9153   echo "$ac_err" >&5
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_header_$ac_safe=no"
9158 fi
9159 rm -f conftest*
9160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9161   echo "$ac_t""yes" 1>&6
9162   
9163             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9164             athena_h_path=X11/Xaw3d
9165           
9166 else
9167   echo "$ac_t""no" 1>&6
9168 fi
9169
9170 else
9171   echo "$ac_t""no" 1>&6
9172 fi
9173
9174     fi
9175
9176         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9177       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9178 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9179 echo "configure:9180: checking for Xaw3d/XawInit.h" >&5
9180
9181 cat > conftest.$ac_ext <<EOF
9182 #line 9183 "configure"
9183 #include "confdefs.h"
9184 #include <Xaw3d/XawInit.h>
9185 EOF
9186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9187 { (eval echo configure:9188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9189 if test -z "$ac_err"; then
9190   rm -rf conftest*
9191   eval "ac_cv_header_$ac_safe=yes"
9192 else
9193   echo "$ac_err" >&5
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   eval "ac_cv_header_$ac_safe=no"
9198 fi
9199 rm -f conftest*
9200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9201   echo "$ac_t""yes" 1>&6
9202   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9203 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9204 echo "configure:9205: checking for Xaw3d/ThreeD.h" >&5
9205
9206 cat > conftest.$ac_ext <<EOF
9207 #line 9208 "configure"
9208 #include "confdefs.h"
9209 #include <Xaw3d/ThreeD.h>
9210 EOF
9211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9212 { (eval echo configure:9213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9214 if test -z "$ac_err"; then
9215   rm -rf conftest*
9216   eval "ac_cv_header_$ac_safe=yes"
9217 else
9218   echo "$ac_err" >&5
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   eval "ac_cv_header_$ac_safe=no"
9223 fi
9224 rm -f conftest*
9225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9226   echo "$ac_t""yes" 1>&6
9227   
9228             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9229             athena_h_path=Xaw3d
9230           
9231 else
9232   echo "$ac_t""no" 1>&6
9233 fi
9234
9235 else
9236   echo "$ac_t""no" 1>&6
9237 fi
9238
9239     fi
9240
9241             if test -z "$athena_h_path"; then
9242       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9243 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9244 echo "configure:9245: checking for X11/Xaw/ThreeD.h" >&5
9245
9246 cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <X11/Xaw/ThreeD.h>
9250 EOF
9251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9252 { (eval echo configure:9253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9254 if test -z "$ac_err"; then
9255   rm -rf conftest*
9256   eval "ac_cv_header_$ac_safe=yes"
9257 else
9258   echo "$ac_err" >&5
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_header_$ac_safe=no"
9263 fi
9264 rm -f conftest*
9265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267   
9268           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9269           athena_h_path=X11/Xaw
9270         
9271 else
9272   echo "$ac_t""no" 1>&6
9273 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9274 fi
9275
9276     fi
9277   fi
9278
9279     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9280     have_xaw=yes
9281   else
9282     have_xaw=no
9283   fi
9284
9285     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9286 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9287 echo "configure:9288: checking for Xm/Xm.h" >&5
9288
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292 #include <Xm/Xm.h>
9293 EOF
9294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9295 { (eval echo configure:9296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9297 if test -z "$ac_err"; then
9298   rm -rf conftest*
9299   eval "ac_cv_header_$ac_safe=yes"
9300 else
9301   echo "$ac_err" >&5
9302   echo "configure: failed program was:" >&5
9303   cat conftest.$ac_ext >&5
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=no"
9306 fi
9307 rm -f conftest*
9308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9309   echo "$ac_t""yes" 1>&6
9310   
9311 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9312 echo "configure:9313: checking for XmStringFree in -lXm" >&5
9313 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9314
9315 xe_check_libs=" -lXm "
9316 cat > conftest.$ac_ext <<EOF
9317 #line 9318 "configure"
9318 #include "confdefs.h"
9319 /* Override any gcc2 internal prototype to avoid an error.  */
9320 /* We use char because int might match the return type of a gcc2
9321     builtin and then its argument prototype would still apply.  */
9322 char XmStringFree();
9323
9324 int main() {
9325 XmStringFree()
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329   rm -rf conftest*
9330   eval "ac_cv_lib_$ac_lib_var=yes"
9331 else
9332   echo "configure: failed program was:" >&5
9333   cat conftest.$ac_ext >&5
9334   rm -rf conftest*
9335   eval "ac_cv_lib_$ac_lib_var=no"
9336 fi
9337 rm -f conftest*
9338 xe_check_libs=""
9339
9340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9341   echo "$ac_t""yes" 1>&6
9342   have_motif=yes
9343 else
9344   echo "$ac_t""no" 1>&6
9345 have_motif=no
9346 fi
9347
9348
9349 else
9350   echo "$ac_t""no" 1>&6
9351 have_motif=no
9352 fi
9353
9354
9355   if test "$have_motif" = "yes"; then
9356         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9357 echo "configure:9358: checking for Lesstif" >&5
9358     cat > conftest.$ac_ext <<EOF
9359 #line 9360 "configure"
9360 #include "confdefs.h"
9361 #include <Xm/Xm.h>
9362 #ifdef LESSTIF_VERSION
9363 yes
9364 #endif
9365
9366 EOF
9367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9368   egrep "yes" >/dev/null 2>&1; then
9369   rm -rf conftest*
9370   have_lesstif=yes
9371 else
9372   rm -rf conftest*
9373   have_lesstif=no
9374 fi
9375 rm -f conftest*
9376
9377   echo "$ac_t""$have_lesstif" 1>&6
9378   fi
9379
9380 fi 
9381
9382 case "$with_menubars" in "" | "yes" | "athena" )
9383   with_menubars="lucid" ;;
9384 esac
9385 case "$with_dialogs" in "" | "yes" | "lucid" )
9386   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9387   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9388   else with_dialogs=no
9389   fi ;;
9390 esac
9391 case "$with_scrollbars" in "" | "yes" )
9392   with_scrollbars="lucid" ;;
9393 esac
9394 case "$with_widgets" in "" | "yes" | "lucid")
9395   if   test "$have_motif" = "yes"; then with_widgets="motif"
9396   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9397   else with_widgets=no
9398   fi ;;
9399 esac
9400
9401 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9402
9403 case "$all_widgets" in
9404   *athena* )
9405     if test "$have_xaw" != "yes"; then
9406       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9407     fi
9408
9409         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9410
9411         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9412
9413                     { test "$extra_verbose" = "yes" && cat << EOF
9414     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9415 EOF
9416 cat >> confdefs.h <<EOF
9417 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9418 EOF
9419 }
9420
9421     { test "$extra_verbose" = "yes" && cat << EOF
9422     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9423 EOF
9424 cat >> confdefs.h <<EOF
9425 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9426 EOF
9427 }
9428
9429     { test "$extra_verbose" = "yes" && cat << EOF
9430     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9431 EOF
9432 cat >> confdefs.h <<EOF
9433 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9434 EOF
9435 }
9436
9437     { test "$extra_verbose" = "yes" && cat << EOF
9438     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9439 EOF
9440 cat >> confdefs.h <<EOF
9441 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9442 EOF
9443 }
9444
9445     { test "$extra_verbose" = "yes" && cat << EOF
9446     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9447 EOF
9448 cat >> confdefs.h <<EOF
9449 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9450 EOF
9451 }
9452
9453     { test "$extra_verbose" = "yes" && cat << EOF
9454     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9455 EOF
9456 cat >> confdefs.h <<EOF
9457 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9458 EOF
9459 }
9460
9461     { test "$extra_verbose" = "yes" && cat << EOF
9462     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9463 EOF
9464 cat >> confdefs.h <<EOF
9465 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9466 EOF
9467 }
9468
9469     { test "$extra_verbose" = "yes" && cat << EOF
9470     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9471 EOF
9472 cat >> confdefs.h <<EOF
9473 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9474 EOF
9475 }
9476
9477     { test "$extra_verbose" = "yes" && cat << EOF
9478     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9479 EOF
9480 cat >> confdefs.h <<EOF
9481 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9482 EOF
9483 }
9484
9485     { test "$extra_verbose" = "yes" && cat << EOF
9486     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9487 EOF
9488 cat >> confdefs.h <<EOF
9489 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9490 EOF
9491 }
9492
9493
9494     { test "$extra_verbose" = "yes" && cat << \EOF
9495     Defining LWLIB_USES_ATHENA
9496 EOF
9497 cat >> confdefs.h <<\EOF
9498 #define LWLIB_USES_ATHENA 1
9499 EOF
9500 }
9501
9502     { test "$extra_verbose" = "yes" && cat << \EOF
9503     Defining NEED_ATHENA
9504 EOF
9505 cat >> confdefs.h <<\EOF
9506 #define NEED_ATHENA 1
9507 EOF
9508 }
9509
9510     need_athena="yes"
9511
9512     if test "$athena_3d" = "yes"; then
9513       { test "$extra_verbose" = "yes" && cat << \EOF
9514     Defining HAVE_ATHENA_3D
9515 EOF
9516 cat >> confdefs.h <<\EOF
9517 #define HAVE_ATHENA_3D 1
9518 EOF
9519 }
9520
9521     fi
9522   ;;
9523 esac
9524
9525 case "$all_widgets" in *motif* )
9526   { test "$extra_verbose" = "yes" && cat << \EOF
9527     Defining LWLIB_USES_MOTIF
9528 EOF
9529 cat >> confdefs.h <<\EOF
9530 #define LWLIB_USES_MOTIF 1
9531 EOF
9532 }
9533
9534   { test "$extra_verbose" = "yes" && cat << \EOF
9535     Defining NEED_MOTIF
9536 EOF
9537 cat >> confdefs.h <<\EOF
9538 #define NEED_MOTIF 1
9539 EOF
9540 }
9541
9542   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9543   need_motif=yes ;;
9544 esac
9545
9546 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9547 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9548 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9549 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9550         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9551 case "$with_widgets" in athena* )
9552         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;;
9553 esac
9554 case "$all_widgets" in *lucid* )
9555   { test "$extra_verbose" = "yes" && cat << \EOF
9556     Defining NEED_LUCID
9557 EOF
9558 cat >> confdefs.h <<\EOF
9559 #define NEED_LUCID 1
9560 EOF
9561 }
9562
9563   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9564 esac
9565
9566
9567
9568 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9569     Defining LWLIB_SCROLLBARS_ATHENA
9570 EOF
9571 cat >> confdefs.h <<\EOF
9572 #define LWLIB_SCROLLBARS_ATHENA 1
9573 EOF
9574 }
9575
9576 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9577     Defining LWLIB_DIALOGS_ATHENA
9578 EOF
9579 cat >> confdefs.h <<\EOF
9580 #define LWLIB_DIALOGS_ATHENA 1
9581 EOF
9582 }
9583
9584
9585 if test "$athena_3d" = "yes"; then
9586   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9587     Defining LWLIB_SCROLLBARS_ATHENA3D
9588 EOF
9589 cat >> confdefs.h <<\EOF
9590 #define LWLIB_SCROLLBARS_ATHENA3D 1
9591 EOF
9592 }
9593
9594   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9595     Defining LWLIB_DIALOGS_ATHENA3D
9596 EOF
9597 cat >> confdefs.h <<\EOF
9598 #define LWLIB_DIALOGS_ATHENA3D 1
9599 EOF
9600 }
9601
9602 fi
9603
9604 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9605     Defining LWLIB_WIDGETS_ATHENA
9606 EOF
9607 cat >> confdefs.h <<\EOF
9608 #define LWLIB_WIDGETS_ATHENA 1
9609 EOF
9610 }
9611 ;; esac
9612 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9613         { test "$extra_verbose" = "yes" && cat << \EOF
9614     Defining LWLIB_TABS_LUCID
9615 EOF
9616 cat >> confdefs.h <<\EOF
9617 #define LWLIB_TABS_LUCID 1
9618 EOF
9619 }
9620
9621
9622 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9623     Defining HAVE_MENUBARS
9624 EOF
9625 cat >> confdefs.h <<\EOF
9626 #define HAVE_MENUBARS 1
9627 EOF
9628 }
9629
9630 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9631     Defining HAVE_SCROLLBARS
9632 EOF
9633 cat >> confdefs.h <<\EOF
9634 #define HAVE_SCROLLBARS 1
9635 EOF
9636 }
9637
9638 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9639     Defining HAVE_DIALOGS
9640 EOF
9641 cat >> confdefs.h <<\EOF
9642 #define HAVE_DIALOGS 1
9643 EOF
9644 }
9645
9646 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9647     Defining HAVE_TOOLBARS
9648 EOF
9649 cat >> confdefs.h <<\EOF
9650 #define HAVE_TOOLBARS 1
9651 EOF
9652 }
9653
9654 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9655     Defining HAVE_WIDGETS
9656 EOF
9657 cat >> confdefs.h <<\EOF
9658 #define HAVE_WIDGETS 1
9659 EOF
9660 }
9661
9662
9663 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9664     Defining LWLIB_MENUBARS_LUCID
9665 EOF
9666 cat >> confdefs.h <<\EOF
9667 #define LWLIB_MENUBARS_LUCID 1
9668 EOF
9669 }
9670
9671 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9672     Defining LWLIB_SCROLLBARS_LUCID
9673 EOF
9674 cat >> confdefs.h <<\EOF
9675 #define LWLIB_SCROLLBARS_LUCID 1
9676 EOF
9677 }
9678
9679
9680 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9681     Defining LWLIB_MENUBARS_MOTIF
9682 EOF
9683 cat >> confdefs.h <<\EOF
9684 #define LWLIB_MENUBARS_MOTIF 1
9685 EOF
9686 }
9687
9688 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9689     Defining LWLIB_SCROLLBARS_MOTIF
9690 EOF
9691 cat >> confdefs.h <<\EOF
9692 #define LWLIB_SCROLLBARS_MOTIF 1
9693 EOF
9694 }
9695
9696 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9697     Defining LWLIB_DIALOGS_MOTIF
9698 EOF
9699 cat >> confdefs.h <<\EOF
9700 #define LWLIB_DIALOGS_MOTIF 1
9701 EOF
9702 }
9703
9704 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9705     Defining LWLIB_WIDGETS_MOTIF
9706 EOF
9707 cat >> confdefs.h <<\EOF
9708 #define LWLIB_WIDGETS_MOTIF 1
9709 EOF
9710 }
9711
9712
9713 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9714    echo "    xemacs will be linked with \"menubar.o\""
9715  fi
9716 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9717    echo "    xemacs will be linked with \"scrollbar.o\""
9718  fi
9719 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9720    echo "    xemacs will be linked with \"dialog.o\""
9721  fi
9722 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9723    echo "    xemacs will be linked with \"toolbar.o\""
9724  fi
9725
9726 if test "$with_gtk" = "yes"; then
9727   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9728    echo "    xemacs will be linked with \"menubar-gtk.o\""
9729  fi
9730   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9731    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9732  fi
9733   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9734    echo "    xemacs will be linked with \"dialog-gtk.o\""
9735  fi
9736   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9737    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9738  fi
9739   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9740    echo "    xemacs will be linked with \"gui-gtk.o\""
9741  fi
9742 fi
9743
9744 if test "$with_x11" = "yes"; then
9745   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9746    echo "    xemacs will be linked with \"menubar-x.o\""
9747  fi
9748   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9749    echo "    xemacs will be linked with \"scrollbar-x.o\""
9750  fi
9751   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"dialog-x.o\""
9753  fi
9754   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9755    echo "    xemacs will be linked with \"toolbar-x.o\""
9756  fi
9757   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9758    echo "    xemacs will be linked with \"gui-x.o\""
9759  fi
9760 fi
9761
9762
9763 test -z "$with_mule" && with_mule=no
9764 test -z "$with_file_coding" && with_file_coding=no
9765
9766
9767 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9768   { test "$extra_verbose" = "yes" && cat << \EOF
9769     Defining FILE_CODING
9770 EOF
9771 cat >> confdefs.h <<\EOF
9772 #define FILE_CODING 1
9773 EOF
9774 }
9775
9776   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9777    echo "    xemacs will be linked with \"file-coding.o\""
9778  fi
9779 fi
9780
9781 if test "$with_mule" = "yes" ; then
9782   echo "checking for Mule-related features" 1>&6
9783 echo "configure:9784: checking for Mule-related features" >&5
9784   { test "$extra_verbose" = "yes" && cat << \EOF
9785     Defining MULE
9786 EOF
9787 cat >> confdefs.h <<\EOF
9788 #define MULE 1
9789 EOF
9790 }
9791
9792   { test "$extra_verbose" = "yes" && cat << \EOF
9793     Defining FILE_CODING
9794 EOF
9795 cat >> confdefs.h <<\EOF
9796 #define FILE_CODING 1
9797 EOF
9798 }
9799
9800   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9801    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9802  fi
9803
9804     for ac_hdr in libintl.h
9805 do
9806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9808 echo "configure:9809: checking for $ac_hdr" >&5
9809
9810 cat > conftest.$ac_ext <<EOF
9811 #line 9812 "configure"
9812 #include "confdefs.h"
9813 #include <$ac_hdr>
9814 EOF
9815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9816 { (eval echo configure:9817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9818 if test -z "$ac_err"; then
9819   rm -rf conftest*
9820   eval "ac_cv_header_$ac_safe=yes"
9821 else
9822   echo "$ac_err" >&5
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825   rm -rf conftest*
9826   eval "ac_cv_header_$ac_safe=no"
9827 fi
9828 rm -f conftest*
9829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9830   echo "$ac_t""yes" 1>&6
9831     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9832   { test "$extra_verbose" = "yes" && cat << EOF
9833     Defining $ac_tr_hdr
9834 EOF
9835 cat >> confdefs.h <<EOF
9836 #define $ac_tr_hdr 1
9837 EOF
9838 }
9839  
9840 else
9841   echo "$ac_t""no" 1>&6
9842 fi
9843 done
9844
9845   
9846 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9847 echo "configure:9848: checking for strerror in -lintl" >&5
9848 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9849
9850 xe_check_libs=" -lintl "
9851 cat > conftest.$ac_ext <<EOF
9852 #line 9853 "configure"
9853 #include "confdefs.h"
9854 /* Override any gcc2 internal prototype to avoid an error.  */
9855 /* We use char because int might match the return type of a gcc2
9856     builtin and then its argument prototype would still apply.  */
9857 char strerror();
9858
9859 int main() {
9860 strerror()
9861 ; return 0; }
9862 EOF
9863 if { (eval echo configure:9864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9864   rm -rf conftest*
9865   eval "ac_cv_lib_$ac_lib_var=yes"
9866 else
9867   echo "configure: failed program was:" >&5
9868   cat conftest.$ac_ext >&5
9869   rm -rf conftest*
9870   eval "ac_cv_lib_$ac_lib_var=no"
9871 fi
9872 rm -f conftest*
9873 xe_check_libs=""
9874
9875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9876   echo "$ac_t""yes" 1>&6
9877     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9878     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9879   { test "$extra_verbose" = "yes" && cat << EOF
9880     Defining $ac_tr_lib
9881 EOF
9882 cat >> confdefs.h <<EOF
9883 #define $ac_tr_lib 1
9884 EOF
9885 }
9886
9887   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9888
9889 else
9890   echo "$ac_t""no" 1>&6
9891 fi
9892
9893
9894
9895   echo "checking for Mule input methods" 1>&6
9896 echo "configure:9897: checking for Mule input methods" >&5
9897         case "$with_xim" in "" | "yes" )
9898     echo "checking for XIM" 1>&6
9899 echo "configure:9900: checking for XIM" >&5
9900     
9901 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9902 echo "configure:9903: checking for XOpenIM in -lX11" >&5
9903 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9904
9905 xe_check_libs=" -lX11 "
9906 cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 /* Override any gcc2 internal prototype to avoid an error.  */
9910 /* We use char because int might match the return type of a gcc2
9911     builtin and then its argument prototype would still apply.  */
9912 char XOpenIM();
9913
9914 int main() {
9915 XOpenIM()
9916 ; return 0; }
9917 EOF
9918 if { (eval echo configure:9919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9919   rm -rf conftest*
9920   eval "ac_cv_lib_$ac_lib_var=yes"
9921 else
9922   echo "configure: failed program was:" >&5
9923   cat conftest.$ac_ext >&5
9924   rm -rf conftest*
9925   eval "ac_cv_lib_$ac_lib_var=no"
9926 fi
9927 rm -f conftest*
9928 xe_check_libs=""
9929
9930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9931   echo "$ac_t""yes" 1>&6
9932   with_xim=xlib
9933 else
9934   echo "$ac_t""no" 1>&6
9935 with_xim=no
9936 fi
9937
9938
9939         if test "$have_motif $have_lesstif" = "yes no"; then
9940       
9941 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9942 echo "configure:9943: checking for XmImMbLookupString in -lXm" >&5
9943 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9944
9945 xe_check_libs=" -lXm "
9946 cat > conftest.$ac_ext <<EOF
9947 #line 9948 "configure"
9948 #include "confdefs.h"
9949 /* Override any gcc2 internal prototype to avoid an error.  */
9950 /* We use char because int might match the return type of a gcc2
9951     builtin and then its argument prototype would still apply.  */
9952 char XmImMbLookupString();
9953
9954 int main() {
9955 XmImMbLookupString()
9956 ; return 0; }
9957 EOF
9958 if { (eval echo configure:9959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9959   rm -rf conftest*
9960   eval "ac_cv_lib_$ac_lib_var=yes"
9961 else
9962   echo "configure: failed program was:" >&5
9963   cat conftest.$ac_ext >&5
9964   rm -rf conftest*
9965   eval "ac_cv_lib_$ac_lib_var=no"
9966 fi
9967 rm -f conftest*
9968 xe_check_libs=""
9969
9970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9971   echo "$ac_t""yes" 1>&6
9972   with_xim=motif
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976
9977
9978     fi ;;
9979   esac
9980   if test "$with_xim" != "no"; then
9981     { test "$extra_verbose" = "yes" && cat << \EOF
9982     Defining HAVE_XIM
9983 EOF
9984 cat >> confdefs.h <<\EOF
9985 #define HAVE_XIM 1
9986 EOF
9987 }
9988
9989     if test "$with_xim" = "xlib"; then
9990       { test "$extra_verbose" = "yes" && cat << \EOF
9991     Defining XIM_XLIB
9992 EOF
9993 cat >> confdefs.h <<\EOF
9994 #define XIM_XLIB 1
9995 EOF
9996 }
9997
9998       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9999    echo "    xemacs will be linked with \"input-method-xlib.o\""
10000  fi
10001     fi
10002     if test "$with_xim" = "motif"; then
10003       { test "$extra_verbose" = "yes" && cat << \EOF
10004     Defining XIM_MOTIF
10005 EOF
10006 cat >> confdefs.h <<\EOF
10007 #define XIM_MOTIF 1
10008 EOF
10009 }
10010
10011       need_motif=yes
10012       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10013    echo "    xemacs will be linked with \"input-method-motif.o\""
10014  fi
10015     fi
10016     if test "$with_xim" = "motif"; then
10017       with_xfs=no
10018     fi
10019   fi
10020
10021     if test "$with_xfs" = "yes" ; then
10022     echo "checking for XFontSet" 1>&6
10023 echo "configure:10024: checking for XFontSet" >&5
10024     
10025 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10026 echo "configure:10027: checking for XmbDrawString in -lX11" >&5
10027 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10028
10029 xe_check_libs=" -lX11 "
10030 cat > conftest.$ac_ext <<EOF
10031 #line 10032 "configure"
10032 #include "confdefs.h"
10033 /* Override any gcc2 internal prototype to avoid an error.  */
10034 /* We use char because int might match the return type of a gcc2
10035     builtin and then its argument prototype would still apply.  */
10036 char XmbDrawString();
10037
10038 int main() {
10039 XmbDrawString()
10040 ; return 0; }
10041 EOF
10042 if { (eval echo configure:10043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10043   rm -rf conftest*
10044   eval "ac_cv_lib_$ac_lib_var=yes"
10045 else
10046   echo "configure: failed program was:" >&5
10047   cat conftest.$ac_ext >&5
10048   rm -rf conftest*
10049   eval "ac_cv_lib_$ac_lib_var=no"
10050 fi
10051 rm -f conftest*
10052 xe_check_libs=""
10053
10054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10055   echo "$ac_t""yes" 1>&6
10056   :
10057 else
10058   echo "$ac_t""no" 1>&6
10059 with_xfs=no
10060 fi
10061
10062
10063     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10064       { test "$extra_verbose" = "yes" && cat << \EOF
10065     Defining USE_XFONTSET
10066 EOF
10067 cat >> confdefs.h <<\EOF
10068 #define USE_XFONTSET 1
10069 EOF
10070 }
10071
10072       if test "$with_xim" = "no" ; then
10073         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10074    echo "    xemacs will be linked with \"input-method-xlib.o\""
10075  fi
10076       fi
10077     fi
10078   fi 
10079     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10080   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10081 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10082 echo "configure:10083: checking for wnn/jllib.h" >&5
10083
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <wnn/jllib.h>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105   :
10106 else
10107   echo "$ac_t""no" 1>&6
10108 with_wnn=no
10109 fi
10110  }
10111     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10112 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10113 echo "configure:10114: checking for wnn/commonhd.h" >&5
10114
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 #include <wnn/commonhd.h>
10119 EOF
10120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10121 { (eval echo configure:10122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10123 if test -z "$ac_err"; then
10124   rm -rf conftest*
10125   eval "ac_cv_header_$ac_safe=yes"
10126 else
10127   echo "$ac_err" >&5
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   eval "ac_cv_header_$ac_safe=no"
10132 fi
10133 rm -f conftest*
10134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10135   echo "$ac_t""yes" 1>&6
10136   :
10137 else
10138   echo "$ac_t""no" 1>&6
10139 with_wnn=no
10140 fi
10141  }
10142     if test "$with_wnn" != "no"; then
10143     for ac_func in crypt
10144 do
10145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10146 echo "configure:10147: checking for $ac_func" >&5
10147
10148 cat > conftest.$ac_ext <<EOF
10149 #line 10150 "configure"
10150 #include "confdefs.h"
10151 /* System header to define __stub macros and hopefully few prototypes,
10152     which can conflict with char $ac_func(); below.  */
10153 #include <assert.h>
10154 /* Override any gcc2 internal prototype to avoid an error.  */
10155 /* We use char because int might match the return type of a gcc2
10156     builtin and then its argument prototype would still apply.  */
10157 char $ac_func();
10158
10159 int main() {
10160
10161 /* The GNU C library defines this for functions which it implements
10162     to always fail with ENOSYS.  Some functions are actually named
10163     something starting with __ and the normal name is an alias.  */
10164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10165 choke me
10166 #else
10167 $ac_func();
10168 #endif
10169
10170 ; return 0; }
10171 EOF
10172 if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10173   rm -rf conftest*
10174   eval "ac_cv_func_$ac_func=yes"
10175 else
10176   echo "configure: failed program was:" >&5
10177   cat conftest.$ac_ext >&5
10178   rm -rf conftest*
10179   eval "ac_cv_func_$ac_func=no"
10180 fi
10181 rm -f conftest*
10182
10183 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10184   echo "$ac_t""yes" 1>&6
10185     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10186   { test "$extra_verbose" = "yes" && cat << EOF
10187     Defining $ac_tr_func
10188 EOF
10189 cat >> confdefs.h <<EOF
10190 #define $ac_tr_func 1
10191 EOF
10192 }
10193  
10194 else
10195   echo "$ac_t""no" 1>&6
10196 fi
10197 done
10198
10199     test "$ac_cv_func_crypt" != "yes" && { 
10200 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10201 echo "configure:10202: checking for crypt in -lcrypt" >&5
10202 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10203
10204 xe_check_libs=" -lcrypt "
10205 cat > conftest.$ac_ext <<EOF
10206 #line 10207 "configure"
10207 #include "confdefs.h"
10208 /* Override any gcc2 internal prototype to avoid an error.  */
10209 /* We use char because int might match the return type of a gcc2
10210     builtin and then its argument prototype would still apply.  */
10211 char crypt();
10212
10213 int main() {
10214 crypt()
10215 ; return 0; }
10216 EOF
10217 if { (eval echo configure:10218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10218   rm -rf conftest*
10219   eval "ac_cv_lib_$ac_lib_var=yes"
10220 else
10221   echo "configure: failed program was:" >&5
10222   cat conftest.$ac_ext >&5
10223   rm -rf conftest*
10224   eval "ac_cv_lib_$ac_lib_var=no"
10225 fi
10226 rm -f conftest*
10227 xe_check_libs=""
10228
10229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10230   echo "$ac_t""yes" 1>&6
10231     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10232     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10233   { test "$extra_verbose" = "yes" && cat << EOF
10234     Defining $ac_tr_lib
10235 EOF
10236 cat >> confdefs.h <<EOF
10237 #define $ac_tr_lib 1
10238 EOF
10239 }
10240
10241   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10242
10243 else
10244   echo "$ac_t""no" 1>&6
10245 fi
10246
10247  }
10248   fi
10249     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10250     
10251 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10252 echo "configure:10253: checking for jl_dic_list_e in -lwnn" >&5
10253 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10254
10255 xe_check_libs=" -lwnn "
10256 cat > conftest.$ac_ext <<EOF
10257 #line 10258 "configure"
10258 #include "confdefs.h"
10259 /* Override any gcc2 internal prototype to avoid an error.  */
10260 /* We use char because int might match the return type of a gcc2
10261     builtin and then its argument prototype would still apply.  */
10262 char jl_dic_list_e();
10263
10264 int main() {
10265 jl_dic_list_e()
10266 ; return 0; }
10267 EOF
10268 if { (eval echo configure:10269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10269   rm -rf conftest*
10270   eval "ac_cv_lib_$ac_lib_var=yes"
10271 else
10272   echo "configure: failed program was:" >&5
10273   cat conftest.$ac_ext >&5
10274   rm -rf conftest*
10275   eval "ac_cv_lib_$ac_lib_var=no"
10276 fi
10277 rm -f conftest*
10278 xe_check_libs=""
10279
10280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10281   echo "$ac_t""yes" 1>&6
10282   libwnn=wnn
10283 else
10284   echo "$ac_t""no" 1>&6
10285 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10286 echo "configure:10287: checking for jl_dic_list_e in -lwnn4" >&5
10287 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10288
10289 xe_check_libs=" -lwnn4 "
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 /* Override any gcc2 internal prototype to avoid an error.  */
10294 /* We use char because int might match the return type of a gcc2
10295     builtin and then its argument prototype would still apply.  */
10296 char jl_dic_list_e();
10297
10298 int main() {
10299 jl_dic_list_e()
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10303   rm -rf conftest*
10304   eval "ac_cv_lib_$ac_lib_var=yes"
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_lib_$ac_lib_var=no"
10310 fi
10311 rm -f conftest*
10312 xe_check_libs=""
10313
10314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10315   echo "$ac_t""yes" 1>&6
10316   libwnn=wnn4
10317 else
10318   echo "$ac_t""no" 1>&6
10319 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10320 echo "configure:10321: checking for jl_dic_list_e in -lwnn6" >&5
10321 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10322
10323 xe_check_libs=" -lwnn6 "
10324 cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 /* Override any gcc2 internal prototype to avoid an error.  */
10328 /* We use char because int might match the return type of a gcc2
10329     builtin and then its argument prototype would still apply.  */
10330 char jl_dic_list_e();
10331
10332 int main() {
10333 jl_dic_list_e()
10334 ; return 0; }
10335 EOF
10336 if { (eval echo configure:10337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10337   rm -rf conftest*
10338   eval "ac_cv_lib_$ac_lib_var=yes"
10339 else
10340   echo "configure: failed program was:" >&5
10341   cat conftest.$ac_ext >&5
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=no"
10344 fi
10345 rm -f conftest*
10346 xe_check_libs=""
10347
10348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10349   echo "$ac_t""yes" 1>&6
10350   libwnn=wnn6
10351 else
10352   echo "$ac_t""no" 1>&6
10353 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10354 echo "configure:10355: checking for dic_list_e in -lwnn6_fromsrc" >&5
10355 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10356
10357 xe_check_libs=" -lwnn6_fromsrc "
10358 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361 /* Override any gcc2 internal prototype to avoid an error.  */
10362 /* We use char because int might match the return type of a gcc2
10363     builtin and then its argument prototype would still apply.  */
10364 char dic_list_e();
10365
10366 int main() {
10367 dic_list_e()
10368 ; return 0; }
10369 EOF
10370 if { (eval echo configure:10371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10371   rm -rf conftest*
10372   eval "ac_cv_lib_$ac_lib_var=yes"
10373 else
10374   echo "configure: failed program was:" >&5
10375   cat conftest.$ac_ext >&5
10376   rm -rf conftest*
10377   eval "ac_cv_lib_$ac_lib_var=no"
10378 fi
10379 rm -f conftest*
10380 xe_check_libs=""
10381
10382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10383   echo "$ac_t""yes" 1>&6
10384   libwnn=wnn6_fromsrc
10385 else
10386   echo "$ac_t""no" 1>&6
10387 with_wnn=no
10388 fi
10389
10390
10391 fi
10392
10393
10394 fi
10395
10396
10397 fi
10398
10399
10400   fi
10401   test -z "$with_wnn" && with_wnn=yes
10402   if test "$with_wnn" = "yes"; then
10403     { test "$extra_verbose" = "yes" && cat << \EOF
10404     Defining HAVE_WNN
10405 EOF
10406 cat >> confdefs.h <<\EOF
10407 #define HAVE_WNN 1
10408 EOF
10409 }
10410
10411     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10412     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10413    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10414  fi
10415     if test "$with_wnn6" != "no"; then
10416       
10417 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10418 echo "configure:10419: checking for jl_fi_dic_list in -l$libwnn" >&5
10419 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10420
10421 xe_check_libs=" -l$libwnn "
10422 cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 /* Override any gcc2 internal prototype to avoid an error.  */
10426 /* We use char because int might match the return type of a gcc2
10427     builtin and then its argument prototype would still apply.  */
10428 char jl_fi_dic_list();
10429
10430 int main() {
10431 jl_fi_dic_list()
10432 ; return 0; }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10435   rm -rf conftest*
10436   eval "ac_cv_lib_$ac_lib_var=yes"
10437 else
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_lib_$ac_lib_var=no"
10442 fi
10443 rm -f conftest*
10444 xe_check_libs=""
10445
10446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10447   echo "$ac_t""yes" 1>&6
10448   with_wnn6=yes
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452
10453
10454       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10455     Defining WNN6
10456 EOF
10457 cat >> confdefs.h <<\EOF
10458 #define WNN6 1
10459 EOF
10460 }
10461
10462     fi
10463   fi
10464
10465     canna_includes_found=no
10466   if test "$with_canna" != "no"; then
10467     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10468 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10469 echo "configure:10470: checking for canna/jrkanji.h" >&5
10470
10471 cat > conftest.$ac_ext <<EOF
10472 #line 10473 "configure"
10473 #include "confdefs.h"
10474 #include <canna/jrkanji.h>
10475 EOF
10476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10477 { (eval echo configure:10478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10479 if test -z "$ac_err"; then
10480   rm -rf conftest*
10481   eval "ac_cv_header_$ac_safe=yes"
10482 else
10483   echo "$ac_err" >&5
10484   echo "configure: failed program was:" >&5
10485   cat conftest.$ac_ext >&5
10486   rm -rf conftest*
10487   eval "ac_cv_header_$ac_safe=no"
10488 fi
10489 rm -f conftest*
10490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10491   echo "$ac_t""yes" 1>&6
10492   canna_includes_found=yes
10493 else
10494   echo "$ac_t""no" 1>&6
10495 fi
10496
10497   fi
10498   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10499       -d "/usr/local/canna/include"; then
10500     save_c_switch_site="$c_switch_site"
10501     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10502     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10503 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10504 echo "configure:10505: checking for canna/jrkanji.h" >&5
10505
10506 cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509 #include <canna/jrkanji.h>
10510 EOF
10511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10512 { (eval echo configure:10513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10514 if test -z "$ac_err"; then
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=yes"
10517 else
10518   echo "$ac_err" >&5
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=no"
10523 fi
10524 rm -f conftest*
10525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527   canna_includes_found=yes
10528 else
10529   echo "$ac_t""no" 1>&6
10530 fi
10531
10532     if test "$canna_includes_found" != "yes"; then
10533       c_switch_site="$save_c_switch_site"
10534       with_canna="no"
10535     fi
10536   fi
10537
10538   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10539 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10540 echo "configure:10541: checking for canna/RK.h" >&5
10541
10542 cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545 #include <canna/RK.h>
10546 EOF
10547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10548 { (eval echo configure:10549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10550 if test -z "$ac_err"; then
10551   rm -rf conftest*
10552   eval "ac_cv_header_$ac_safe=yes"
10553 else
10554   echo "$ac_err" >&5
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   eval "ac_cv_header_$ac_safe=no"
10559 fi
10560 rm -f conftest*
10561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10562   echo "$ac_t""yes" 1>&6
10563   :
10564 else
10565   echo "$ac_t""no" 1>&6
10566 with_canna=no
10567 fi
10568  }
10569   test -z "$with_canna" && { 
10570 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10571 echo "configure:10572: checking for RkBgnBun in -lRKC" >&5
10572 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10573
10574 xe_check_libs=" -lRKC "
10575 cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 /* Override any gcc2 internal prototype to avoid an error.  */
10579 /* We use char because int might match the return type of a gcc2
10580     builtin and then its argument prototype would still apply.  */
10581 char RkBgnBun();
10582
10583 int main() {
10584 RkBgnBun()
10585 ; return 0; }
10586 EOF
10587 if { (eval echo configure:10588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10588   rm -rf conftest*
10589   eval "ac_cv_lib_$ac_lib_var=yes"
10590 else
10591   echo "configure: failed program was:" >&5
10592   cat conftest.$ac_ext >&5
10593   rm -rf conftest*
10594   eval "ac_cv_lib_$ac_lib_var=no"
10595 fi
10596 rm -f conftest*
10597 xe_check_libs=""
10598
10599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10600   echo "$ac_t""yes" 1>&6
10601   :
10602 else
10603   echo "$ac_t""no" 1>&6
10604 with_canna=no
10605 fi
10606
10607  }
10608   test -z "$with_canna" && { 
10609 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10610 echo "configure:10611: checking for jrKanjiControl in -lcanna" >&5
10611 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10612
10613 xe_check_libs=" -lcanna "
10614 cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617 /* Override any gcc2 internal prototype to avoid an error.  */
10618 /* We use char because int might match the return type of a gcc2
10619     builtin and then its argument prototype would still apply.  */
10620 char jrKanjiControl();
10621
10622 int main() {
10623 jrKanjiControl()
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_lib_$ac_lib_var=no"
10634 fi
10635 rm -f conftest*
10636 xe_check_libs=""
10637
10638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10639   echo "$ac_t""yes" 1>&6
10640   :
10641 else
10642   echo "$ac_t""no" 1>&6
10643 with_canna=no
10644 fi
10645
10646  }
10647   test -z "$with_canna" && with_canna=yes
10648   if test "$with_canna" = "yes"; then
10649     { test "$extra_verbose" = "yes" && cat << \EOF
10650     Defining HAVE_CANNA
10651 EOF
10652 cat >> confdefs.h <<\EOF
10653 #define HAVE_CANNA 1
10654 EOF
10655 }
10656
10657     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10658     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10659    echo "    xemacs will be linked with \"mule-canna.o\""
10660  fi
10661   fi
10662
10663 else   for feature in xim canna wnn; do
10664     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10665       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10666     fi
10667     eval "with_${feature}=no"
10668   done
10669 fi 
10670
10671 if test "$need_motif" = "yes" ; then
10672   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10673     
10674 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10675 echo "configure:10676: checking for layout_object_getvalue in -li18n" >&5
10676 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10677
10678 xe_check_libs=" -li18n "
10679 cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 /* Override any gcc2 internal prototype to avoid an error.  */
10683 /* We use char because int might match the return type of a gcc2
10684     builtin and then its argument prototype would still apply.  */
10685 char layout_object_getvalue();
10686
10687 int main() {
10688 layout_object_getvalue()
10689 ; return 0; }
10690 EOF
10691 if { (eval echo configure:10692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10692   rm -rf conftest*
10693   eval "ac_cv_lib_$ac_lib_var=yes"
10694 else
10695   echo "configure: failed program was:" >&5
10696   cat conftest.$ac_ext >&5
10697   rm -rf conftest*
10698   eval "ac_cv_lib_$ac_lib_var=no"
10699 fi
10700 rm -f conftest*
10701 xe_check_libs=""
10702
10703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10704   echo "$ac_t""yes" 1>&6
10705   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10706 else
10707   echo "$ac_t""no" 1>&6
10708 fi
10709
10710
10711   
10712 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10713     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10714   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10715   
10716         runpath="" runpath_dirs=""
10717   if test -n "$LD_RUN_PATH"; then
10718     runpath="$LD_RUN_PATH"
10719   elif test "$GCC" = "yes"; then
10720         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10721     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10722     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10723     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10724       case "$arg" in P,* | -L* | -R* )
10725         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10726           {
10727 xe_runpath_dir="$dir"
10728   test "$xe_runpath_dir" != "/lib"     -a \
10729         "$xe_runpath_dir" != "/usr/lib" -a \
10730         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10731   eval "$xe_add_unique_runpath_dir"
10732 }
10733         done ;;
10734       esac
10735     done
10736     ld_switch_run="$ld_switch_run_save"
10737     rm -f conftest*
10738   else
10739         for arg in $ld_switch_site $ld_switch_x_site; do
10740       case "$arg" in -L*) {
10741 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10742   test "$xe_runpath_dir" != "/lib"     -a \
10743         "$xe_runpath_dir" != "/usr/lib" -a \
10744         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10745   eval "$xe_add_unique_runpath_dir"
10746 };; esac
10747     done
10748         if test "$opsys $need_motif" = "sol2 yes"; then
10749       xe_runpath_dir="/opt/SUNWdt/lib";
10750       eval "$xe_add_unique_runpath_dir";
10751     fi
10752   fi 
10753   if test -n "$runpath"; then
10754     ld_switch_run="${dash_r}${runpath}"
10755     
10756 if test "$GCC" = "yes"; then
10757   set x $ld_switch_run; shift; ld_switch_run=""
10758   while test -n "$1"; do
10759     case $1 in
10760       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10761       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10762       -Xlinker* ) ;;
10763       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10764     esac
10765     shift
10766   done
10767 fi
10768     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10769   fi
10770 fi
10771
10772 fi
10773
10774 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
10775 do
10776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10777 echo "configure:10778: checking for $ac_func" >&5
10778
10779 cat > conftest.$ac_ext <<EOF
10780 #line 10781 "configure"
10781 #include "confdefs.h"
10782 /* System header to define __stub macros and hopefully few prototypes,
10783     which can conflict with char $ac_func(); below.  */
10784 #include <assert.h>
10785 /* Override any gcc2 internal prototype to avoid an error.  */
10786 /* We use char because int might match the return type of a gcc2
10787     builtin and then its argument prototype would still apply.  */
10788 char $ac_func();
10789
10790 int main() {
10791
10792 /* The GNU C library defines this for functions which it implements
10793     to always fail with ENOSYS.  Some functions are actually named
10794     something starting with __ and the normal name is an alias.  */
10795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10796 choke me
10797 #else
10798 $ac_func();
10799 #endif
10800
10801 ; return 0; }
10802 EOF
10803 if { (eval echo configure:10804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10804   rm -rf conftest*
10805   eval "ac_cv_func_$ac_func=yes"
10806 else
10807   echo "configure: failed program was:" >&5
10808   cat conftest.$ac_ext >&5
10809   rm -rf conftest*
10810   eval "ac_cv_func_$ac_func=no"
10811 fi
10812 rm -f conftest*
10813
10814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10815   echo "$ac_t""yes" 1>&6
10816     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10817   { test "$extra_verbose" = "yes" && cat << EOF
10818     Defining $ac_tr_func
10819 EOF
10820 cat >> confdefs.h <<EOF
10821 #define $ac_tr_func 1
10822 EOF
10823 }
10824  
10825 else
10826   echo "$ac_t""no" 1>&6
10827 fi
10828 done
10829
10830
10831
10832 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10833 do
10834 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10835 echo "configure:10836: checking for $ac_func" >&5
10836
10837 cat > conftest.$ac_ext <<EOF
10838 #line 10839 "configure"
10839 #include "confdefs.h"
10840 /* System header to define __stub macros and hopefully few prototypes,
10841     which can conflict with char $ac_func(); below.  */
10842 #include <assert.h>
10843 /* Override any gcc2 internal prototype to avoid an error.  */
10844 /* We use char because int might match the return type of a gcc2
10845     builtin and then its argument prototype would still apply.  */
10846 char $ac_func();
10847
10848 int main() {
10849
10850 /* The GNU C library defines this for functions which it implements
10851     to always fail with ENOSYS.  Some functions are actually named
10852     something starting with __ and the normal name is an alias.  */
10853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10854 choke me
10855 #else
10856 $ac_func();
10857 #endif
10858
10859 ; return 0; }
10860 EOF
10861 if { (eval echo configure:10862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10862   rm -rf conftest*
10863   eval "ac_cv_func_$ac_func=yes"
10864 else
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -rf conftest*
10868   eval "ac_cv_func_$ac_func=no"
10869 fi
10870 rm -f conftest*
10871
10872 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10873   echo "$ac_t""yes" 1>&6
10874     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10875   { test "$extra_verbose" = "yes" && cat << EOF
10876     Defining $ac_tr_func
10877 EOF
10878 cat >> confdefs.h <<EOF
10879 #define $ac_tr_func 1
10880 EOF
10881 }
10882  
10883 else
10884   echo "$ac_t""no" 1>&6
10885 fi
10886 done
10887
10888
10889 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10890 echo "configure:10891: checking for openpty" >&5
10891
10892 cat > conftest.$ac_ext <<EOF
10893 #line 10894 "configure"
10894 #include "confdefs.h"
10895 /* System header to define __stub macros and hopefully few prototypes,
10896     which can conflict with char openpty(); below.  */
10897 #include <assert.h>
10898 /* Override any gcc2 internal prototype to avoid an error.  */
10899 /* We use char because int might match the return type of a gcc2
10900     builtin and then its argument prototype would still apply.  */
10901 char openpty();
10902
10903 int main() {
10904
10905 /* The GNU C library defines this for functions which it implements
10906     to always fail with ENOSYS.  Some functions are actually named
10907     something starting with __ and the normal name is an alias.  */
10908 #if defined (__stub_openpty) || defined (__stub___openpty)
10909 choke me
10910 #else
10911 openpty();
10912 #endif
10913
10914 ; return 0; }
10915 EOF
10916 if { (eval echo configure:10917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10917   rm -rf conftest*
10918   eval "ac_cv_func_openpty=yes"
10919 else
10920   echo "configure: failed program was:" >&5
10921   cat conftest.$ac_ext >&5
10922   rm -rf conftest*
10923   eval "ac_cv_func_openpty=no"
10924 fi
10925 rm -f conftest*
10926
10927 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10928   echo "$ac_t""yes" 1>&6
10929   have_openpty=yes
10930 else
10931   echo "$ac_t""no" 1>&6
10932
10933   
10934 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10935 echo "configure:10936: checking for openpty in -lutil" >&5
10936 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10937
10938 xe_check_libs=" -lutil "
10939 cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942 /* Override any gcc2 internal prototype to avoid an error.  */
10943 /* We use char because int might match the return type of a gcc2
10944     builtin and then its argument prototype would still apply.  */
10945 char openpty();
10946
10947 int main() {
10948 openpty()
10949 ; return 0; }
10950 EOF
10951 if { (eval echo configure:10952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10952   rm -rf conftest*
10953   eval "ac_cv_lib_$ac_lib_var=yes"
10954 else
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -rf conftest*
10958   eval "ac_cv_lib_$ac_lib_var=no"
10959 fi
10960 rm -f conftest*
10961 xe_check_libs=""
10962
10963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10964   echo "$ac_t""yes" 1>&6
10965   have_openpty=yes need_libutil=yes
10966 else
10967   echo "$ac_t""no" 1>&6
10968 fi
10969
10970
10971 fi
10972
10973 if test "$have_openpty" = "yes"; then
10974   { test "$extra_verbose" = "yes" && cat << \EOF
10975     Defining HAVE_OPENPTY
10976 EOF
10977 cat >> confdefs.h <<\EOF
10978 #define HAVE_OPENPTY 1
10979 EOF
10980 }
10981
10982   for ac_hdr in pty.h libutil.h util.h
10983 do
10984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_hdr" >&5
10987
10988 cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 #include <$ac_hdr>
10992 EOF
10993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10994 { (eval echo configure:10995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10996 if test -z "$ac_err"; then
10997   rm -rf conftest*
10998   eval "ac_cv_header_$ac_safe=yes"
10999 else
11000   echo "$ac_err" >&5
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   eval "ac_cv_header_$ac_safe=no"
11005 fi
11006 rm -f conftest*
11007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11008   echo "$ac_t""yes" 1>&6
11009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11010   { test "$extra_verbose" = "yes" && cat << EOF
11011     Defining $ac_tr_hdr
11012 EOF
11013 cat >> confdefs.h <<EOF
11014 #define $ac_tr_hdr 1
11015 EOF
11016 }
11017  break
11018 else
11019   echo "$ac_t""no" 1>&6
11020 fi
11021 done
11022
11023   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11024 fi
11025
11026 for ac_hdr in stropts.h
11027 do
11028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11030 echo "configure:11031: checking for $ac_hdr" >&5
11031
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11034 "configure"
11034 #include "confdefs.h"
11035 #include <$ac_hdr>
11036 EOF
11037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11038 { (eval echo configure:11039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11040 if test -z "$ac_err"; then
11041   rm -rf conftest*
11042   eval "ac_cv_header_$ac_safe=yes"
11043 else
11044   echo "$ac_err" >&5
11045   echo "configure: failed program was:" >&5
11046   cat conftest.$ac_ext >&5
11047   rm -rf conftest*
11048   eval "ac_cv_header_$ac_safe=no"
11049 fi
11050 rm -f conftest*
11051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11052   echo "$ac_t""yes" 1>&6
11053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11054   { test "$extra_verbose" = "yes" && cat << EOF
11055     Defining $ac_tr_hdr
11056 EOF
11057 cat >> confdefs.h <<EOF
11058 #define $ac_tr_hdr 1
11059 EOF
11060 }
11061  
11062 else
11063   echo "$ac_t""no" 1>&6
11064 fi
11065 done
11066
11067 if test "$ac_cv_header_stropts_h" = "yes"; then
11068   for ac_func in isastream
11069 do
11070 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11071 echo "configure:11072: checking for $ac_func" >&5
11072
11073 cat > conftest.$ac_ext <<EOF
11074 #line 11075 "configure"
11075 #include "confdefs.h"
11076 /* System header to define __stub macros and hopefully few prototypes,
11077     which can conflict with char $ac_func(); below.  */
11078 #include <assert.h>
11079 /* Override any gcc2 internal prototype to avoid an error.  */
11080 /* We use char because int might match the return type of a gcc2
11081     builtin and then its argument prototype would still apply.  */
11082 char $ac_func();
11083
11084 int main() {
11085
11086 /* The GNU C library defines this for functions which it implements
11087     to always fail with ENOSYS.  Some functions are actually named
11088     something starting with __ and the normal name is an alias.  */
11089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11090 choke me
11091 #else
11092 $ac_func();
11093 #endif
11094
11095 ; return 0; }
11096 EOF
11097 if { (eval echo configure:11098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11098   rm -rf conftest*
11099   eval "ac_cv_func_$ac_func=yes"
11100 else
11101   echo "configure: failed program was:" >&5
11102   cat conftest.$ac_ext >&5
11103   rm -rf conftest*
11104   eval "ac_cv_func_$ac_func=no"
11105 fi
11106 rm -f conftest*
11107
11108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11111   { test "$extra_verbose" = "yes" && cat << EOF
11112     Defining $ac_tr_func
11113 EOF
11114 cat >> confdefs.h <<EOF
11115 #define $ac_tr_func 1
11116 EOF
11117 }
11118  
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124   for ac_hdr in strtio.h
11125 do
11126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11128 echo "configure:11129: checking for $ac_hdr" >&5
11129
11130 cat > conftest.$ac_ext <<EOF
11131 #line 11132 "configure"
11132 #include "confdefs.h"
11133 #include <$ac_hdr>
11134 EOF
11135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11136 { (eval echo configure:11137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11138 if test -z "$ac_err"; then
11139   rm -rf conftest*
11140   eval "ac_cv_header_$ac_safe=yes"
11141 else
11142   echo "$ac_err" >&5
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   eval "ac_cv_header_$ac_safe=no"
11147 fi
11148 rm -f conftest*
11149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11150   echo "$ac_t""yes" 1>&6
11151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11152   { test "$extra_verbose" = "yes" && cat << EOF
11153     Defining $ac_tr_hdr
11154 EOF
11155 cat >> confdefs.h <<EOF
11156 #define $ac_tr_hdr 1
11157 EOF
11158 }
11159  
11160 else
11161   echo "$ac_t""no" 1>&6
11162 fi
11163 done
11164  fi
11165
11166 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11167    echo "    xemacs will be linked with \"realpath.o\""
11168  fi
11169
11170 for ac_func in getloadavg
11171 do
11172 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11173 echo "configure:11174: checking for $ac_func" >&5
11174
11175 cat > conftest.$ac_ext <<EOF
11176 #line 11177 "configure"
11177 #include "confdefs.h"
11178 /* System header to define __stub macros and hopefully few prototypes,
11179     which can conflict with char $ac_func(); below.  */
11180 #include <assert.h>
11181 /* Override any gcc2 internal prototype to avoid an error.  */
11182 /* We use char because int might match the return type of a gcc2
11183     builtin and then its argument prototype would still apply.  */
11184 char $ac_func();
11185
11186 int main() {
11187
11188 /* The GNU C library defines this for functions which it implements
11189     to always fail with ENOSYS.  Some functions are actually named
11190     something starting with __ and the normal name is an alias.  */
11191 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11192 choke me
11193 #else
11194 $ac_func();
11195 #endif
11196
11197 ; return 0; }
11198 EOF
11199 if { (eval echo configure:11200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11200   rm -rf conftest*
11201   eval "ac_cv_func_$ac_func=yes"
11202 else
11203   echo "configure: failed program was:" >&5
11204   cat conftest.$ac_ext >&5
11205   rm -rf conftest*
11206   eval "ac_cv_func_$ac_func=no"
11207 fi
11208 rm -f conftest*
11209
11210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11211   echo "$ac_t""yes" 1>&6
11212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11213   { test "$extra_verbose" = "yes" && cat << EOF
11214     Defining $ac_tr_func
11215 EOF
11216 cat >> confdefs.h <<EOF
11217 #define $ac_tr_func 1
11218 EOF
11219 }
11220  
11221 else
11222   echo "$ac_t""no" 1>&6
11223 fi
11224 done
11225
11226
11227 if test "$ac_cv_func_getloadavg" = "yes"; then
11228         for ac_hdr in sys/loadavg.h
11229 do
11230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11232 echo "configure:11233: checking for $ac_hdr" >&5
11233
11234 cat > conftest.$ac_ext <<EOF
11235 #line 11236 "configure"
11236 #include "confdefs.h"
11237 #include <$ac_hdr>
11238 EOF
11239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11240 { (eval echo configure:11241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11242 if test -z "$ac_err"; then
11243   rm -rf conftest*
11244   eval "ac_cv_header_$ac_safe=yes"
11245 else
11246   echo "$ac_err" >&5
11247   echo "configure: failed program was:" >&5
11248   cat conftest.$ac_ext >&5
11249   rm -rf conftest*
11250   eval "ac_cv_header_$ac_safe=no"
11251 fi
11252 rm -f conftest*
11253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11254   echo "$ac_t""yes" 1>&6
11255     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11256   { test "$extra_verbose" = "yes" && cat << EOF
11257     Defining $ac_tr_hdr
11258 EOF
11259 cat >> confdefs.h <<EOF
11260 #define $ac_tr_hdr 1
11261 EOF
11262 }
11263  
11264 else
11265   echo "$ac_t""no" 1>&6
11266 fi
11267 done
11268
11269 else
11270     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11271    echo "    xemacs will be linked with \"getloadavg.o\""
11272  fi
11273
11274     
11275 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11276 echo "configure:11277: checking for kstat_open in -lkstat" >&5
11277 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11278
11279 xe_check_libs=" -lkstat "
11280 cat > conftest.$ac_ext <<EOF
11281 #line 11282 "configure"
11282 #include "confdefs.h"
11283 /* Override any gcc2 internal prototype to avoid an error.  */
11284 /* We use char because int might match the return type of a gcc2
11285     builtin and then its argument prototype would still apply.  */
11286 char kstat_open();
11287
11288 int main() {
11289 kstat_open()
11290 ; return 0; }
11291 EOF
11292 if { (eval echo configure:11293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11293   rm -rf conftest*
11294   eval "ac_cv_lib_$ac_lib_var=yes"
11295 else
11296   echo "configure: failed program was:" >&5
11297   cat conftest.$ac_ext >&5
11298   rm -rf conftest*
11299   eval "ac_cv_lib_$ac_lib_var=no"
11300 fi
11301 rm -f conftest*
11302 xe_check_libs=""
11303
11304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11305   echo "$ac_t""yes" 1>&6
11306     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11308   { test "$extra_verbose" = "yes" && cat << EOF
11309     Defining $ac_tr_lib
11310 EOF
11311 cat >> confdefs.h <<EOF
11312 #define $ac_tr_lib 1
11313 EOF
11314 }
11315
11316   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11317
11318 else
11319   echo "$ac_t""no" 1>&6
11320 fi
11321
11322
11323   for ac_hdr in kstat.h
11324 do
11325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11327 echo "configure:11328: checking for $ac_hdr" >&5
11328
11329 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 #include <$ac_hdr>
11333 EOF
11334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11335 { (eval echo configure:11336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11337 if test -z "$ac_err"; then
11338   rm -rf conftest*
11339   eval "ac_cv_header_$ac_safe=yes"
11340 else
11341   echo "$ac_err" >&5
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=no"
11346 fi
11347 rm -f conftest*
11348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11349   echo "$ac_t""yes" 1>&6
11350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11351   { test "$extra_verbose" = "yes" && cat << EOF
11352     Defining $ac_tr_hdr
11353 EOF
11354 cat >> confdefs.h <<EOF
11355 #define $ac_tr_hdr 1
11356 EOF
11357 }
11358  
11359 else
11360   echo "$ac_t""no" 1>&6
11361 fi
11362 done
11363
11364
11365     
11366 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11367 echo "configure:11368: checking for kvm_read in -lkvm" >&5
11368 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11369
11370 xe_check_libs=" -lkvm "
11371 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 /* Override any gcc2 internal prototype to avoid an error.  */
11375 /* We use char because int might match the return type of a gcc2
11376     builtin and then its argument prototype would still apply.  */
11377 char kvm_read();
11378
11379 int main() {
11380 kvm_read()
11381 ; return 0; }
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=yes"
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_lib_$ac_lib_var=no"
11391 fi
11392 rm -f conftest*
11393 xe_check_libs=""
11394
11395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11396   echo "$ac_t""yes" 1>&6
11397     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11398     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11399   { test "$extra_verbose" = "yes" && cat << EOF
11400     Defining $ac_tr_lib
11401 EOF
11402 cat >> confdefs.h <<EOF
11403 #define $ac_tr_lib 1
11404 EOF
11405 }
11406
11407   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11408
11409 else
11410   echo "$ac_t""no" 1>&6
11411 fi
11412
11413
11414 fi
11415
11416 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11417 echo "configure:11418: checking whether netdb declares h_errno" >&5
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 #include <netdb.h>
11422 int main() {
11423 return h_errno;
11424 ; return 0; }
11425 EOF
11426 if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11427   rm -rf conftest*
11428   echo "$ac_t""yes" 1>&6
11429    { test "$extra_verbose" = "yes" && cat << \EOF
11430     Defining HAVE_H_ERRNO
11431 EOF
11432 cat >> confdefs.h <<\EOF
11433 #define HAVE_H_ERRNO 1
11434 EOF
11435 }
11436
11437 else
11438   echo "configure: failed program was:" >&5
11439   cat conftest.$ac_ext >&5
11440   rm -rf conftest*
11441   echo "$ac_t""no" 1>&6
11442 fi
11443 rm -f conftest*
11444
11445 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11446 echo "configure:11447: checking for sigsetjmp" >&5
11447 cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450 #include <setjmp.h>
11451 int main() {
11452 sigjmp_buf bar; sigsetjmp (bar, 0);
11453 ; return 0; }
11454 EOF
11455 if { (eval echo configure:11456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11456   rm -rf conftest*
11457   echo "$ac_t""yes" 1>&6
11458    { test "$extra_verbose" = "yes" && cat << \EOF
11459     Defining HAVE_SIGSETJMP
11460 EOF
11461 cat >> confdefs.h <<\EOF
11462 #define HAVE_SIGSETJMP 1
11463 EOF
11464 }
11465
11466 else
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   echo "$ac_t""no" 1>&6
11471 fi
11472 rm -f conftest*
11473
11474 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11475 echo "configure:11476: checking whether localtime caches TZ" >&5
11476
11477 if test "$ac_cv_func_tzset" = "yes"; then
11478 cat > conftest.$ac_ext <<EOF
11479 #line 11480 "configure"
11480 #include "confdefs.h"
11481 #include <time.h>
11482 #if STDC_HEADERS
11483 # include <stdlib.h>
11484 #endif
11485 extern char **environ;
11486 unset_TZ ()
11487 {
11488   char **from, **to;
11489   for (to = from = environ; (*to = *from); from++)
11490     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11491       to++;
11492 }
11493 char TZ_GMT0[] = "TZ=GMT0";
11494 char TZ_PST8[] = "TZ=PST8";
11495 main()
11496 {
11497   time_t now = time ((time_t *) 0);
11498   int hour_GMT0, hour_unset;
11499   if (putenv (TZ_GMT0) != 0)
11500     exit (1);
11501   hour_GMT0 = localtime (&now)->tm_hour;
11502   unset_TZ ();
11503   hour_unset = localtime (&now)->tm_hour;
11504   if (putenv (TZ_PST8) != 0)
11505     exit (1);
11506   if (localtime (&now)->tm_hour == hour_GMT0)
11507     exit (1);
11508   unset_TZ ();
11509   if (localtime (&now)->tm_hour != hour_unset)
11510     exit (1);
11511   exit (0);
11512 }
11513 EOF
11514 if { (eval echo configure:11515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11515 then
11516   emacs_cv_localtime_cache=no
11517 else
11518   conftest_rc="$?"
11519   echo "configure: failed program was:" >&5
11520   cat conftest.$ac_ext >&5
11521   rm -fr conftest*
11522   emacs_cv_localtime_cache=yes
11523 fi
11524 rm -fr conftest*
11525 else
11526         # If we lack tzset, report that localtime does not cache TZ,
11527         # since we can't invalidate the cache if we don't have tzset.
11528         emacs_cv_localtime_cache=no
11529 fi
11530 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11531 if test $emacs_cv_localtime_cache = yes; then
11532   { test "$extra_verbose" = "yes" && cat << \EOF
11533     Defining LOCALTIME_CACHE
11534 EOF
11535 cat >> confdefs.h <<\EOF
11536 #define LOCALTIME_CACHE 1
11537 EOF
11538 }
11539
11540 fi
11541
11542 if test "$HAVE_TIMEVAL" = "yes"; then
11543 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11544 echo "configure:11545: checking whether gettimeofday accepts one or two arguments" >&5
11545 cat > conftest.$ac_ext <<EOF
11546 #line 11547 "configure"
11547 #include "confdefs.h"
11548
11549 #ifdef TIME_WITH_SYS_TIME
11550 #include <sys/time.h>
11551 #include <time.h>
11552 #else
11553 #ifdef HAVE_SYS_TIME_H
11554 #include <sys/time.h>
11555 #else
11556 #include <time.h>
11557 #endif
11558 #endif
11559   
11560 int main() {
11561
11562   struct timeval time;
11563   gettimeofday (&time, 0);
11564
11565 ; return 0; }
11566 EOF
11567 if { (eval echo configure:11568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11568   rm -rf conftest*
11569   echo "$ac_t""two" 1>&6
11570 else
11571   echo "configure: failed program was:" >&5
11572   cat conftest.$ac_ext >&5
11573   rm -rf conftest*
11574   echo "$ac_t""one" 1>&6
11575    { test "$extra_verbose" = "yes" && cat << \EOF
11576     Defining GETTIMEOFDAY_ONE_ARGUMENT
11577 EOF
11578 cat >> confdefs.h <<\EOF
11579 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11580 EOF
11581 }
11582
11583 fi
11584 rm -f conftest*
11585 fi
11586
11587
11588 echo $ac_n "checking for inline""... $ac_c" 1>&6
11589 echo "configure:11590: checking for inline" >&5
11590
11591 ac_cv_c_inline=no
11592 for ac_kw in inline __inline__ __inline; do
11593   cat > conftest.$ac_ext <<EOF
11594 #line 11595 "configure"
11595 #include "confdefs.h"
11596
11597 int main() {
11598 } int $ac_kw foo() {
11599 ; return 0; }
11600 EOF
11601 if { (eval echo configure:11602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11602   rm -rf conftest*
11603   ac_cv_c_inline=$ac_kw; break
11604 else
11605   echo "configure: failed program was:" >&5
11606   cat conftest.$ac_ext >&5
11607 fi
11608 rm -f conftest*
11609 done
11610
11611
11612 echo "$ac_t""$ac_cv_c_inline" 1>&6
11613 case "$ac_cv_c_inline" in
11614   inline | yes) ;;
11615   no) { test "$extra_verbose" = "yes" && cat << \EOF
11616     Defining inline = 
11617 EOF
11618 cat >> confdefs.h <<\EOF
11619 #define inline 
11620 EOF
11621 }
11622  ;;
11623   *)  { test "$extra_verbose" = "yes" && cat << EOF
11624     Defining inline = $ac_cv_c_inline
11625 EOF
11626 cat >> confdefs.h <<EOF
11627 #define inline $ac_cv_c_inline
11628 EOF
11629 }
11630  ;;
11631 esac
11632
11633 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11634    echo "    xemacs will be linked with \"inline.o\""
11635  fi
11636
11637
11638 if test "$__DECC" != "yes"; then
11639   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11640 # for constant arguments.  Useless!
11641 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11642 echo "configure:11643: checking for working alloca.h" >&5
11643
11644 cat > conftest.$ac_ext <<EOF
11645 #line 11646 "configure"
11646 #include "confdefs.h"
11647 #include <alloca.h>
11648 int main() {
11649 void *p = alloca(2 * sizeof(int));
11650 ; return 0; }
11651 EOF
11652 if { (eval echo configure:11653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11653   rm -rf conftest*
11654   ac_cv_header_alloca_h=yes
11655 else
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   ac_cv_header_alloca_h=no
11660 fi
11661 rm -f conftest*
11662
11663 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11664 if test $ac_cv_header_alloca_h = yes; then
11665   { test "$extra_verbose" = "yes" && cat << \EOF
11666     Defining HAVE_ALLOCA_H
11667 EOF
11668 cat >> confdefs.h <<\EOF
11669 #define HAVE_ALLOCA_H 1
11670 EOF
11671 }
11672
11673 fi
11674
11675 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11676 echo "configure:11677: checking for alloca" >&5
11677
11678 cat > conftest.$ac_ext <<EOF
11679 #line 11680 "configure"
11680 #include "confdefs.h"
11681
11682 #ifdef __GNUC__
11683 # define alloca __builtin_alloca
11684 #else
11685 # ifdef _MSC_VER
11686 #  include <malloc.h>
11687 #  define alloca _alloca
11688 # else
11689 #  if HAVE_ALLOCA_H
11690 #   include <alloca.h>
11691 #  else
11692 #   ifdef _AIX
11693  #pragma alloca
11694 #   else
11695 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11696 char *alloca ();
11697 #    endif
11698 #   endif
11699 #  endif
11700 # endif
11701 #endif
11702
11703 int main() {
11704 char *p = (char *) alloca(1);
11705 ; return 0; }
11706 EOF
11707 if { (eval echo configure:11708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11708   rm -rf conftest*
11709   ac_cv_func_alloca_works=yes
11710 else
11711   echo "configure: failed program was:" >&5
11712   cat conftest.$ac_ext >&5
11713   rm -rf conftest*
11714   ac_cv_func_alloca_works=no
11715 fi
11716 rm -f conftest*
11717
11718 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11719 if test $ac_cv_func_alloca_works = yes; then
11720   { test "$extra_verbose" = "yes" && cat << \EOF
11721     Defining HAVE_ALLOCA
11722 EOF
11723 cat >> confdefs.h <<\EOF
11724 #define HAVE_ALLOCA 1
11725 EOF
11726 }
11727
11728 fi
11729
11730 if test $ac_cv_func_alloca_works = no; then
11731   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11732   # that cause trouble.  Some versions do not even contain alloca or
11733   # contain a buggy version.  If you still want to use their alloca,
11734   # use ar to extract alloca.o from them instead of compiling alloca.c.
11735   ALLOCA=alloca.${ac_objext}
11736   { test "$extra_verbose" = "yes" && cat << \EOF
11737     Defining C_ALLOCA
11738 EOF
11739 cat >> confdefs.h <<\EOF
11740 #define C_ALLOCA 1
11741 EOF
11742 }
11743
11744
11745 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11746 echo "configure:11747: checking whether alloca needs Cray hooks" >&5
11747
11748 cat > conftest.$ac_ext <<EOF
11749 #line 11750 "configure"
11750 #include "confdefs.h"
11751 #if defined(CRAY) && ! defined(CRAY2)
11752 webecray
11753 #else
11754 wenotbecray
11755 #endif
11756
11757 EOF
11758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11759   egrep "webecray" >/dev/null 2>&1; then
11760   rm -rf conftest*
11761   ac_cv_os_cray=yes
11762 else
11763   rm -rf conftest*
11764   ac_cv_os_cray=no
11765 fi
11766 rm -f conftest*
11767
11768
11769 echo "$ac_t""$ac_cv_os_cray" 1>&6
11770 if test $ac_cv_os_cray = yes; then
11771 for ac_func in _getb67 GETB67 getb67; do
11772   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11773 echo "configure:11774: checking for $ac_func" >&5
11774
11775 cat > conftest.$ac_ext <<EOF
11776 #line 11777 "configure"
11777 #include "confdefs.h"
11778 /* System header to define __stub macros and hopefully few prototypes,
11779     which can conflict with char $ac_func(); below.  */
11780 #include <assert.h>
11781 /* Override any gcc2 internal prototype to avoid an error.  */
11782 /* We use char because int might match the return type of a gcc2
11783     builtin and then its argument prototype would still apply.  */
11784 char $ac_func();
11785
11786 int main() {
11787
11788 /* The GNU C library defines this for functions which it implements
11789     to always fail with ENOSYS.  Some functions are actually named
11790     something starting with __ and the normal name is an alias.  */
11791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11792 choke me
11793 #else
11794 $ac_func();
11795 #endif
11796
11797 ; return 0; }
11798 EOF
11799 if { (eval echo configure:11800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11800   rm -rf conftest*
11801   eval "ac_cv_func_$ac_func=yes"
11802 else
11803   echo "configure: failed program was:" >&5
11804   cat conftest.$ac_ext >&5
11805   rm -rf conftest*
11806   eval "ac_cv_func_$ac_func=no"
11807 fi
11808 rm -f conftest*
11809
11810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11811   echo "$ac_t""yes" 1>&6
11812   { test "$extra_verbose" = "yes" && cat << EOF
11813     Defining CRAY_STACKSEG_END = $ac_func
11814 EOF
11815 cat >> confdefs.h <<EOF
11816 #define CRAY_STACKSEG_END $ac_func
11817 EOF
11818 }
11819
11820   break
11821 else
11822   echo "$ac_t""no" 1>&6
11823 fi
11824
11825 done
11826 fi
11827
11828 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11829 echo "configure:11830: checking stack direction for C alloca" >&5
11830
11831 cat > conftest.$ac_ext <<EOF
11832 #line 11833 "configure"
11833 #include "confdefs.h"
11834 find_stack_direction ()
11835 {
11836   static char *addr = 0;
11837   auto char dummy;
11838   if (addr == 0)
11839     {
11840       addr = &dummy;
11841       return find_stack_direction ();
11842     }
11843   else
11844     return (&dummy > addr) ? 1 : -1;
11845 }
11846 main ()
11847 {
11848   exit (find_stack_direction() < 0);
11849 }
11850 EOF
11851 if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11852 then
11853   ac_cv_c_stack_direction=1
11854 else
11855   conftest_rc="$?"
11856   echo "configure: failed program was:" >&5
11857   cat conftest.$ac_ext >&5
11858   rm -fr conftest*
11859   ac_cv_c_stack_direction=-1
11860 fi
11861 rm -fr conftest*
11862
11863 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11864 { test "$extra_verbose" = "yes" && cat << EOF
11865     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11866 EOF
11867 cat >> confdefs.h <<EOF
11868 #define STACK_DIRECTION $ac_cv_c_stack_direction
11869 EOF
11870 }
11871
11872 fi
11873
11874   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11875    echo "    xemacs will be linked with \"$ALLOCA\""
11876  fi
11877 fi
11878
11879 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11880 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11881 echo "configure:11882: checking for vfork.h" >&5
11882
11883 cat > conftest.$ac_ext <<EOF
11884 #line 11885 "configure"
11885 #include "confdefs.h"
11886 #include <vfork.h>
11887 EOF
11888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11889 { (eval echo configure:11890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11891 if test -z "$ac_err"; then
11892   rm -rf conftest*
11893   eval "ac_cv_header_$ac_safe=yes"
11894 else
11895   echo "$ac_err" >&5
11896   echo "configure: failed program was:" >&5
11897   cat conftest.$ac_ext >&5
11898   rm -rf conftest*
11899   eval "ac_cv_header_$ac_safe=no"
11900 fi
11901 rm -f conftest*
11902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11903   echo "$ac_t""yes" 1>&6
11904   { test "$extra_verbose" = "yes" && cat << \EOF
11905     Defining HAVE_VFORK_H
11906 EOF
11907 cat >> confdefs.h <<\EOF
11908 #define HAVE_VFORK_H 1
11909 EOF
11910 }
11911
11912 else
11913   echo "$ac_t""no" 1>&6
11914 fi
11915
11916 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11917 echo "configure:11918: checking for working vfork" >&5
11918
11919 cat > conftest.$ac_ext <<EOF
11920 #line 11921 "configure"
11921 #include "confdefs.h"
11922 /* Thanks to Paul Eggert for this test.  */
11923 #include <stdio.h>
11924 #include <sys/types.h>
11925 #include <sys/stat.h>
11926 #ifdef HAVE_UNISTD_H
11927 #include <unistd.h>
11928 #endif
11929 #ifdef HAVE_VFORK_H
11930 #include <vfork.h>
11931 #endif
11932 /* On some sparc systems, changes by the child to local and incoming
11933    argument registers are propagated back to the parent.
11934    The compiler is told about this with #include <vfork.h>,
11935    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11936    Test for this by using a static variable whose address
11937    is put into a register that is clobbered by the vfork.  */
11938 static
11939 #ifdef __cplusplus
11940 sparc_address_test (int arg)
11941 #else
11942 sparc_address_test (arg) int arg;
11943 #endif
11944 {
11945   static pid_t child;
11946   if (!child) {
11947     child = vfork ();
11948     if (child < 0) {
11949       perror ("vfork");
11950       _exit(2);
11951     }
11952     if (!child) {
11953       arg = getpid();
11954       write(-1, "", 0);
11955       _exit (arg);
11956     }
11957   }
11958 }
11959 main() {
11960   pid_t parent = getpid ();
11961   pid_t child;
11962
11963   sparc_address_test ();
11964
11965   child = vfork ();
11966
11967   if (child == 0) {
11968     /* Here is another test for sparc vfork register problems.
11969        This test uses lots of local variables, at least
11970        as many local variables as main has allocated so far
11971        including compiler temporaries.  4 locals are enough for
11972        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11973        A buggy compiler should reuse the register of parent
11974        for one of the local variables, since it will think that
11975        parent can't possibly be used any more in this routine.
11976        Assigning to the local variable will thus munge parent
11977        in the parent process.  */
11978     pid_t
11979       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11980       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11981     /* Convince the compiler that p..p7 are live; otherwise, it might
11982        use the same hardware register for all 8 local variables.  */
11983     if (p != p1 || p != p2 || p != p3 || p != p4
11984         || p != p5 || p != p6 || p != p7)
11985       _exit(1);
11986
11987     /* On some systems (e.g. IRIX 3.3),
11988        vfork doesn't separate parent from child file descriptors.
11989        If the child closes a descriptor before it execs or exits,
11990        this munges the parent's descriptor as well.
11991        Test for this by closing stdout in the child.  */
11992     _exit(close(fileno(stdout)) != 0);
11993   } else {
11994     int status;
11995     struct stat st;
11996
11997     while (wait(&status) != child)
11998       ;
11999     exit(
12000          /* Was there some problem with vforking?  */
12001          child < 0
12002
12003          /* Did the child fail?  (This shouldn't happen.)  */
12004          || status
12005
12006          /* Did the vfork/compiler bug occur?  */
12007          || parent != getpid()
12008
12009          /* Did the file descriptor bug occur?  */
12010          || fstat(fileno(stdout), &st) != 0
12011          );
12012   }
12013 }
12014 EOF
12015 if { (eval echo configure:12016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12016 then
12017   ac_cv_func_vfork_works=yes
12018 else
12019   conftest_rc="$?"
12020   echo "configure: failed program was:" >&5
12021   cat conftest.$ac_ext >&5
12022   rm -fr conftest*
12023   ac_cv_func_vfork_works=no
12024 fi
12025 rm -fr conftest*
12026
12027 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12028 if test $ac_cv_func_vfork_works = no; then
12029   { test "$extra_verbose" = "yes" && cat << \EOF
12030     Defining vfork = fork
12031 EOF
12032 cat >> confdefs.h <<\EOF
12033 #define vfork fork
12034 EOF
12035 }
12036
12037 fi
12038
12039
12040 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12041 echo "configure:12042: checking for working strcoll" >&5
12042
12043 cat > conftest.$ac_ext <<EOF
12044 #line 12045 "configure"
12045 #include "confdefs.h"
12046 #include <string.h>
12047 main ()
12048 {
12049   exit (strcoll ("abc", "def") >= 0 ||
12050         strcoll ("ABC", "DEF") >= 0 ||
12051         strcoll ("123", "456") >= 0);
12052 }
12053 EOF
12054 if { (eval echo configure:12055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12055 then
12056   ac_cv_func_strcoll_works=yes
12057 else
12058   conftest_rc="$?"
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -fr conftest*
12062   ac_cv_func_strcoll_works=no
12063 fi
12064 rm -fr conftest*
12065
12066 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12067 if test $ac_cv_func_strcoll_works = yes; then
12068   { test "$extra_verbose" = "yes" && cat << \EOF
12069     Defining HAVE_STRCOLL
12070 EOF
12071 cat >> confdefs.h <<\EOF
12072 #define HAVE_STRCOLL 1
12073 EOF
12074 }
12075
12076 fi
12077
12078
12079 for ac_func in getpgrp
12080 do
12081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12082 echo "configure:12083: checking for $ac_func" >&5
12083
12084 cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087 /* System header to define __stub macros and hopefully few prototypes,
12088     which can conflict with char $ac_func(); below.  */
12089 #include <assert.h>
12090 /* Override any gcc2 internal prototype to avoid an error.  */
12091 /* We use char because int might match the return type of a gcc2
12092     builtin and then its argument prototype would still apply.  */
12093 char $ac_func();
12094
12095 int main() {
12096
12097 /* The GNU C library defines this for functions which it implements
12098     to always fail with ENOSYS.  Some functions are actually named
12099     something starting with __ and the normal name is an alias.  */
12100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12101 choke me
12102 #else
12103 $ac_func();
12104 #endif
12105
12106 ; return 0; }
12107 EOF
12108 if { (eval echo configure:12109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12109   rm -rf conftest*
12110   eval "ac_cv_func_$ac_func=yes"
12111 else
12112   echo "configure: failed program was:" >&5
12113   cat conftest.$ac_ext >&5
12114   rm -rf conftest*
12115   eval "ac_cv_func_$ac_func=no"
12116 fi
12117 rm -f conftest*
12118
12119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12120   echo "$ac_t""yes" 1>&6
12121     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12122   { test "$extra_verbose" = "yes" && cat << EOF
12123     Defining $ac_tr_func
12124 EOF
12125 cat >> confdefs.h <<EOF
12126 #define $ac_tr_func 1
12127 EOF
12128 }
12129  
12130 else
12131   echo "$ac_t""no" 1>&6
12132 fi
12133 done
12134
12135 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12136 echo "configure:12137: checking whether getpgrp takes no argument" >&5
12137
12138 cat > conftest.$ac_ext <<EOF
12139 #line 12140 "configure"
12140 #include "confdefs.h"
12141
12142 /*
12143  * If this system has a BSD-style getpgrp(),
12144  * which takes a pid argument, exit unsuccessfully.
12145  *
12146  * Snarfed from Chet Ramey's bash pgrp.c test program
12147  */
12148 #include <stdio.h>
12149 #include <sys/types.h>
12150
12151 int     pid;
12152 int     pg1, pg2, pg3, pg4;
12153 int     ng, np, s, child;
12154
12155 main()
12156 {
12157         pid = getpid();
12158         pg1 = getpgrp(0);
12159         pg2 = getpgrp();
12160         pg3 = getpgrp(pid);
12161         pg4 = getpgrp(1);
12162
12163         /*
12164          * If all of these values are the same, it's pretty sure that
12165          * we're on a system that ignores getpgrp's first argument.
12166          */
12167         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12168                 exit(0);
12169
12170         child = fork();
12171         if (child < 0)
12172                 exit(1);
12173         else if (child == 0) {
12174                 np = getpid();
12175                 /*
12176                  * If this is Sys V, this will not work; pgrp will be
12177                  * set to np because setpgrp just changes a pgrp to be
12178                  * the same as the pid.
12179                  */
12180                 setpgrp(np, pg1);
12181                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12182                 if (ng == pg1) {
12183                         exit(1);
12184                 } else {
12185                         exit(0);
12186                 }
12187         } else {
12188                 wait(&s);
12189                 exit(s>>8);
12190         }
12191 }
12192
12193 EOF
12194 if { (eval echo configure:12195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12195 then
12196   ac_cv_func_getpgrp_void=yes
12197 else
12198   conftest_rc="$?"
12199   echo "configure: failed program was:" >&5
12200   cat conftest.$ac_ext >&5
12201   rm -fr conftest*
12202   ac_cv_func_getpgrp_void=no
12203 fi
12204 rm -fr conftest*
12205
12206
12207 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12208 if test $ac_cv_func_getpgrp_void = yes; then
12209   { test "$extra_verbose" = "yes" && cat << \EOF
12210     Defining GETPGRP_VOID
12211 EOF
12212 cat >> confdefs.h <<\EOF
12213 #define GETPGRP_VOID 1
12214 EOF
12215 }
12216
12217 fi
12218
12219
12220 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12221 echo "configure:12222: checking for working mmap" >&5
12222 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12223 cat > conftest.$ac_ext <<EOF
12224 #line 12225 "configure"
12225 #include "confdefs.h"
12226 #include <stdio.h>
12227 #include <unistd.h>
12228 #include <fcntl.h>
12229 #include <sys/mman.h>
12230
12231 #ifndef MAP_VARIABLE
12232 #define MAP_VARIABLE 0
12233 #endif
12234
12235 #ifndef MAP_FAILED
12236 #define MAP_FAILED -1
12237 #endif
12238
12239 int main (int argc, char *argv[])
12240 {
12241   int fd = -1;
12242   caddr_t p;
12243 #ifndef MAP_ANONYMOUS
12244   fd = open ("/dev/zero", O_RDWR);
12245   if (fd < 0)
12246     return 1;
12247 #define MAP_ANONYMOUS 0
12248 #endif
12249   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12250            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12251            fd, 0) != (void *) MAP_FAILED)
12252     return 0;
12253   perror ("conftest: mmap failed");
12254   return 1;
12255 }
12256 EOF
12257 if { (eval echo configure:12258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12258 then
12259   have_mmap=yes
12260 else
12261   conftest_rc="$?"
12262   echo "configure: failed program was:" >&5
12263   cat conftest.$ac_ext >&5
12264   rm -fr conftest*
12265   have_mmap=no
12266 fi
12267 rm -fr conftest* ;;
12268 esac
12269 echo "$ac_t""$have_mmap" 1>&6
12270 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12271     Defining HAVE_MMAP
12272 EOF
12273 cat >> confdefs.h <<\EOF
12274 #define HAVE_MMAP 1
12275 EOF
12276 }
12277
12278
12279 case "$opsys" in cygwin*) 
12280         test "$rel_alloc" = "default" && rel_alloc=no ;;
12281 esac
12282 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12283 if test "$rel_alloc $have_mmap" = "default yes"; then
12284   if test "$doug_lea_malloc" = "yes"; then
12285         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12286 echo "configure:12287: checking for M_MMAP_THRESHOLD" >&5
12287     cat > conftest.$ac_ext <<EOF
12288 #line 12289 "configure"
12289 #include "confdefs.h"
12290 #include <malloc.h>
12291 int main() {
12292
12293 #ifndef M_MMAP_THRESHOLD
12294 #error No M_MMAP_THRESHOLD :-(
12295 !@+$%^&*_)(_ - unlikely to compile...
12296 #endif
12297
12298 ; return 0; }
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12301   rm -rf conftest*
12302   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12303 else
12304   echo "configure: failed program was:" >&5
12305   cat conftest.$ac_ext >&5
12306   rm -rf conftest*
12307   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12308 fi
12309 rm -f conftest*
12310   else
12311     rel_alloc=yes
12312   fi
12313 fi
12314 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12315     Defining REL_ALLOC
12316 EOF
12317 cat >> confdefs.h <<\EOF
12318 #define REL_ALLOC 1
12319 EOF
12320 }
12321
12322
12323 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12324 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12325 echo "configure:12326: checking for termios.h" >&5
12326
12327 cat > conftest.$ac_ext <<EOF
12328 #line 12329 "configure"
12329 #include "confdefs.h"
12330 #include <termios.h>
12331 EOF
12332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12333 { (eval echo configure:12334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12335 if test -z "$ac_err"; then
12336   rm -rf conftest*
12337   eval "ac_cv_header_$ac_safe=yes"
12338 else
12339   echo "$ac_err" >&5
12340   echo "configure: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   rm -rf conftest*
12343   eval "ac_cv_header_$ac_safe=no"
12344 fi
12345 rm -f conftest*
12346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12347   echo "$ac_t""yes" 1>&6
12348   { test "$extra_verbose" = "yes" && cat << \EOF
12349     Defining HAVE_TERMIOS
12350 EOF
12351 cat >> confdefs.h <<\EOF
12352 #define HAVE_TERMIOS 1
12353 EOF
12354 }
12355
12356   { test "$extra_verbose" = "yes" && cat << \EOF
12357     Defining SIGNALS_VIA_CHARACTERS
12358 EOF
12359 cat >> confdefs.h <<\EOF
12360 #define SIGNALS_VIA_CHARACTERS 1
12361 EOF
12362 }
12363
12364   { test "$extra_verbose" = "yes" && cat << \EOF
12365     Defining NO_TERMIO
12366 EOF
12367 cat >> confdefs.h <<\EOF
12368 #define NO_TERMIO 1
12369 EOF
12370 }
12371
12372 else
12373   echo "$ac_t""no" 1>&6
12374 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12375 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12376 echo "configure:12377: checking for termio.h" >&5
12377
12378 cat > conftest.$ac_ext <<EOF
12379 #line 12380 "configure"
12380 #include "confdefs.h"
12381 #include <termio.h>
12382 EOF
12383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12384 { (eval echo configure:12385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12386 if test -z "$ac_err"; then
12387   rm -rf conftest*
12388   eval "ac_cv_header_$ac_safe=yes"
12389 else
12390   echo "$ac_err" >&5
12391   echo "configure: failed program was:" >&5
12392   cat conftest.$ac_ext >&5
12393   rm -rf conftest*
12394   eval "ac_cv_header_$ac_safe=no"
12395 fi
12396 rm -f conftest*
12397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12398   echo "$ac_t""yes" 1>&6
12399   { test "$extra_verbose" = "yes" && cat << \EOF
12400     Defining HAVE_TERMIO
12401 EOF
12402 cat >> confdefs.h <<\EOF
12403 #define HAVE_TERMIO 1
12404 EOF
12405 }
12406
12407 else
12408   echo "$ac_t""no" 1>&6
12409 fi
12410
12411 fi
12412
12413
12414
12415 echo $ac_n "checking for socket""... $ac_c" 1>&6
12416 echo "configure:12417: checking for socket" >&5
12417
12418 cat > conftest.$ac_ext <<EOF
12419 #line 12420 "configure"
12420 #include "confdefs.h"
12421 /* System header to define __stub macros and hopefully few prototypes,
12422     which can conflict with char socket(); below.  */
12423 #include <assert.h>
12424 /* Override any gcc2 internal prototype to avoid an error.  */
12425 /* We use char because int might match the return type of a gcc2
12426     builtin and then its argument prototype would still apply.  */
12427 char socket();
12428
12429 int main() {
12430
12431 /* The GNU C library defines this for functions which it implements
12432     to always fail with ENOSYS.  Some functions are actually named
12433     something starting with __ and the normal name is an alias.  */
12434 #if defined (__stub_socket) || defined (__stub___socket)
12435 choke me
12436 #else
12437 socket();
12438 #endif
12439
12440 ; return 0; }
12441 EOF
12442 if { (eval echo configure:12443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12443   rm -rf conftest*
12444   eval "ac_cv_func_socket=yes"
12445 else
12446   echo "configure: failed program was:" >&5
12447   cat conftest.$ac_ext >&5
12448   rm -rf conftest*
12449   eval "ac_cv_func_socket=no"
12450 fi
12451 rm -f conftest*
12452
12453 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12454   echo "$ac_t""yes" 1>&6
12455   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12456 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12457 echo "configure:12458: checking for netinet/in.h" >&5
12458
12459 cat > conftest.$ac_ext <<EOF
12460 #line 12461 "configure"
12461 #include "confdefs.h"
12462 #include <netinet/in.h>
12463 EOF
12464 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12465 { (eval echo configure:12466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12466 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12467 if test -z "$ac_err"; then
12468   rm -rf conftest*
12469   eval "ac_cv_header_$ac_safe=yes"
12470 else
12471   echo "$ac_err" >&5
12472   echo "configure: failed program was:" >&5
12473   cat conftest.$ac_ext >&5
12474   rm -rf conftest*
12475   eval "ac_cv_header_$ac_safe=no"
12476 fi
12477 rm -f conftest*
12478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12479   echo "$ac_t""yes" 1>&6
12480   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12481 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12482 echo "configure:12483: checking for arpa/inet.h" >&5
12483
12484 cat > conftest.$ac_ext <<EOF
12485 #line 12486 "configure"
12486 #include "confdefs.h"
12487 #include <arpa/inet.h>
12488 EOF
12489 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12490 { (eval echo configure:12491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12491 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12492 if test -z "$ac_err"; then
12493   rm -rf conftest*
12494   eval "ac_cv_header_$ac_safe=yes"
12495 else
12496   echo "$ac_err" >&5
12497   echo "configure: failed program was:" >&5
12498   cat conftest.$ac_ext >&5
12499   rm -rf conftest*
12500   eval "ac_cv_header_$ac_safe=no"
12501 fi
12502 rm -f conftest*
12503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12504   echo "$ac_t""yes" 1>&6
12505   
12506   { test "$extra_verbose" = "yes" && cat << \EOF
12507     Defining HAVE_SOCKETS
12508 EOF
12509 cat >> confdefs.h <<\EOF
12510 #define HAVE_SOCKETS 1
12511 EOF
12512 }
12513
12514       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12515 echo "configure:12516: checking "for sun_len member in struct sockaddr_un"" >&5
12516       cat > conftest.$ac_ext <<EOF
12517 #line 12518 "configure"
12518 #include "confdefs.h"
12519
12520 #include <sys/types.h>
12521 #include <sys/socket.h>
12522 #include <sys/un.h>
12523       
12524 int main() {
12525 static struct sockaddr_un x; x.sun_len = 1;
12526 ; return 0; }
12527 EOF
12528 if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12529   rm -rf conftest*
12530   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12531     Defining HAVE_SOCKADDR_SUN_LEN
12532 EOF
12533 cat >> confdefs.h <<\EOF
12534 #define HAVE_SOCKADDR_SUN_LEN 1
12535 EOF
12536 }
12537
12538 else
12539   echo "configure: failed program was:" >&5
12540   cat conftest.$ac_ext >&5
12541   rm -rf conftest*
12542   echo "$ac_t""no" 1>&6
12543 fi
12544 rm -f conftest*
12545       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12546 echo "configure:12547: checking "for ip_mreq struct in netinet/in.h"" >&5
12547       cat > conftest.$ac_ext <<EOF
12548 #line 12549 "configure"
12549 #include "confdefs.h"
12550
12551 #include <sys/types.h>
12552 #include <netinet/in.h>
12553       
12554 int main() {
12555 static struct ip_mreq x;
12556 ; return 0; }
12557 EOF
12558 if { (eval echo configure:12559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12559   rm -rf conftest*
12560   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12561     Defining HAVE_MULTICAST
12562 EOF
12563 cat >> confdefs.h <<\EOF
12564 #define HAVE_MULTICAST 1
12565 EOF
12566 }
12567
12568 else
12569   echo "configure: failed program was:" >&5
12570   cat conftest.$ac_ext >&5
12571   rm -rf conftest*
12572   echo "$ac_t""no" 1>&6
12573 fi
12574 rm -f conftest*
12575 else
12576   echo "$ac_t""no" 1>&6
12577 fi
12578
12579 else
12580   echo "$ac_t""no" 1>&6
12581 fi
12582
12583 else
12584   echo "$ac_t""no" 1>&6
12585 fi
12586
12587
12588 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12589 echo "configure:12590: checking for msgget" >&5
12590
12591 cat > conftest.$ac_ext <<EOF
12592 #line 12593 "configure"
12593 #include "confdefs.h"
12594 /* System header to define __stub macros and hopefully few prototypes,
12595     which can conflict with char msgget(); below.  */
12596 #include <assert.h>
12597 /* Override any gcc2 internal prototype to avoid an error.  */
12598 /* We use char because int might match the return type of a gcc2
12599     builtin and then its argument prototype would still apply.  */
12600 char msgget();
12601
12602 int main() {
12603
12604 /* The GNU C library defines this for functions which it implements
12605     to always fail with ENOSYS.  Some functions are actually named
12606     something starting with __ and the normal name is an alias.  */
12607 #if defined (__stub_msgget) || defined (__stub___msgget)
12608 choke me
12609 #else
12610 msgget();
12611 #endif
12612
12613 ; return 0; }
12614 EOF
12615 if { (eval echo configure:12616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12616   rm -rf conftest*
12617   eval "ac_cv_func_msgget=yes"
12618 else
12619   echo "configure: failed program was:" >&5
12620   cat conftest.$ac_ext >&5
12621   rm -rf conftest*
12622   eval "ac_cv_func_msgget=no"
12623 fi
12624 rm -f conftest*
12625
12626 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12627   echo "$ac_t""yes" 1>&6
12628   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12629 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12630 echo "configure:12631: checking for sys/ipc.h" >&5
12631
12632 cat > conftest.$ac_ext <<EOF
12633 #line 12634 "configure"
12634 #include "confdefs.h"
12635 #include <sys/ipc.h>
12636 EOF
12637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12638 { (eval echo configure:12639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12640 if test -z "$ac_err"; then
12641   rm -rf conftest*
12642   eval "ac_cv_header_$ac_safe=yes"
12643 else
12644   echo "$ac_err" >&5
12645   echo "configure: failed program was:" >&5
12646   cat conftest.$ac_ext >&5
12647   rm -rf conftest*
12648   eval "ac_cv_header_$ac_safe=no"
12649 fi
12650 rm -f conftest*
12651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12652   echo "$ac_t""yes" 1>&6
12653   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12654 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12655 echo "configure:12656: checking for sys/msg.h" >&5
12656
12657 cat > conftest.$ac_ext <<EOF
12658 #line 12659 "configure"
12659 #include "confdefs.h"
12660 #include <sys/msg.h>
12661 EOF
12662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12663 { (eval echo configure:12664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12665 if test -z "$ac_err"; then
12666   rm -rf conftest*
12667   eval "ac_cv_header_$ac_safe=yes"
12668 else
12669   echo "$ac_err" >&5
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -rf conftest*
12673   eval "ac_cv_header_$ac_safe=no"
12674 fi
12675 rm -f conftest*
12676 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12677   echo "$ac_t""yes" 1>&6
12678   { test "$extra_verbose" = "yes" && cat << \EOF
12679     Defining HAVE_SYSVIPC
12680 EOF
12681 cat >> confdefs.h <<\EOF
12682 #define HAVE_SYSVIPC 1
12683 EOF
12684 }
12685
12686 else
12687   echo "$ac_t""no" 1>&6
12688 fi
12689
12690 else
12691   echo "$ac_t""no" 1>&6
12692 fi
12693
12694 else
12695   echo "$ac_t""no" 1>&6
12696 fi
12697
12698
12699 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12700 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12701 echo "configure:12702: checking for dirent.h" >&5
12702
12703 cat > conftest.$ac_ext <<EOF
12704 #line 12705 "configure"
12705 #include "confdefs.h"
12706 #include <dirent.h>
12707 EOF
12708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12709 { (eval echo configure:12710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12711 if test -z "$ac_err"; then
12712   rm -rf conftest*
12713   eval "ac_cv_header_$ac_safe=yes"
12714 else
12715   echo "$ac_err" >&5
12716   echo "configure: failed program was:" >&5
12717   cat conftest.$ac_ext >&5
12718   rm -rf conftest*
12719   eval "ac_cv_header_$ac_safe=no"
12720 fi
12721 rm -f conftest*
12722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12723   echo "$ac_t""yes" 1>&6
12724   { test "$extra_verbose" = "yes" && cat << \EOF
12725     Defining SYSV_SYSTEM_DIR
12726 EOF
12727 cat >> confdefs.h <<\EOF
12728 #define SYSV_SYSTEM_DIR 1
12729 EOF
12730 }
12731
12732 else
12733   echo "$ac_t""no" 1>&6
12734 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12735 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12736 echo "configure:12737: checking for sys/dir.h" >&5
12737
12738 cat > conftest.$ac_ext <<EOF
12739 #line 12740 "configure"
12740 #include "confdefs.h"
12741 #include <sys/dir.h>
12742 EOF
12743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12744 { (eval echo configure:12745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12746 if test -z "$ac_err"; then
12747   rm -rf conftest*
12748   eval "ac_cv_header_$ac_safe=yes"
12749 else
12750   echo "$ac_err" >&5
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -rf conftest*
12754   eval "ac_cv_header_$ac_safe=no"
12755 fi
12756 rm -f conftest*
12757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12758   echo "$ac_t""yes" 1>&6
12759   :
12760 else
12761   echo "$ac_t""no" 1>&6
12762 { test "$extra_verbose" = "yes" && cat << \EOF
12763     Defining NONSYSTEM_DIR_LIBRARY
12764 EOF
12765 cat >> confdefs.h <<\EOF
12766 #define NONSYSTEM_DIR_LIBRARY 1
12767 EOF
12768 }
12769
12770 fi
12771
12772 fi
12773
12774
12775 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12776 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12777 echo "configure:12778: checking for nlist.h" >&5
12778
12779 cat > conftest.$ac_ext <<EOF
12780 #line 12781 "configure"
12781 #include "confdefs.h"
12782 #include <nlist.h>
12783 EOF
12784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12785 { (eval echo configure:12786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12787 if test -z "$ac_err"; then
12788   rm -rf conftest*
12789   eval "ac_cv_header_$ac_safe=yes"
12790 else
12791   echo "$ac_err" >&5
12792   echo "configure: failed program was:" >&5
12793   cat conftest.$ac_ext >&5
12794   rm -rf conftest*
12795   eval "ac_cv_header_$ac_safe=no"
12796 fi
12797 rm -f conftest*
12798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12799   echo "$ac_t""yes" 1>&6
12800   { test "$extra_verbose" = "yes" && cat << \EOF
12801     Defining NLIST_STRUCT
12802 EOF
12803 cat >> confdefs.h <<\EOF
12804 #define NLIST_STRUCT 1
12805 EOF
12806 }
12807
12808 else
12809   echo "$ac_t""no" 1>&6
12810 fi
12811
12812
12813
12814 echo "checking "for sound support"" 1>&6
12815 echo "configure:12816: checking "for sound support"" >&5
12816 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12817
12818 if test "$with_native_sound" != "no"; then
12819     if test -n "$native_sound_lib"; then
12820     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12821 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12822 echo "configure:12823: checking for multimedia/audio_device.h" >&5
12823
12824 cat > conftest.$ac_ext <<EOF
12825 #line 12826 "configure"
12826 #include "confdefs.h"
12827 #include <multimedia/audio_device.h>
12828 EOF
12829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12830 { (eval echo configure:12831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12832 if test -z "$ac_err"; then
12833   rm -rf conftest*
12834   eval "ac_cv_header_$ac_safe=yes"
12835 else
12836   echo "$ac_err" >&5
12837   echo "configure: failed program was:" >&5
12838   cat conftest.$ac_ext >&5
12839   rm -rf conftest*
12840   eval "ac_cv_header_$ac_safe=no"
12841 fi
12842 rm -f conftest*
12843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12844   echo "$ac_t""yes" 1>&6
12845   sound_found=yes sound_cflags=""
12846       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12847    echo "    xemacs will be linked with \"sunplay.o\""
12848  fi
12849 else
12850   echo "$ac_t""no" 1>&6
12851 fi
12852
12853   fi
12854
12855     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12856     sound_found=yes
12857     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12858    echo "    xemacs will be linked with \"sunplay.o\""
12859  fi
12860     if test -d "/usr/demo/SOUND/include"
12861       then sound_cflags="-I/usr/demo/SOUND/include"
12862       else sound_cflags="-I/usr/demo/SOUND"
12863     fi
12864     if test -z "$native_sound_lib" ; then
12865       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12866         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12867         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12868       fi
12869     fi
12870   fi
12871
12872     if test -z "$sound_found"; then
12873     case "$canonical" in
12874     *-sgi-* )
12875       if test -z "$native_sound_lib"; then
12876         
12877 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12878 echo "configure:12879: checking for ALopenport in -laudio" >&5
12879 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12880
12881 xe_check_libs=" -laudio "
12882 cat > conftest.$ac_ext <<EOF
12883 #line 12884 "configure"
12884 #include "confdefs.h"
12885 /* Override any gcc2 internal prototype to avoid an error.  */
12886 /* We use char because int might match the return type of a gcc2
12887     builtin and then its argument prototype would still apply.  */
12888 char ALopenport();
12889
12890 int main() {
12891 ALopenport()
12892 ; return 0; }
12893 EOF
12894 if { (eval echo configure:12895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12895   rm -rf conftest*
12896   eval "ac_cv_lib_$ac_lib_var=yes"
12897 else
12898   echo "configure: failed program was:" >&5
12899   cat conftest.$ac_ext >&5
12900   rm -rf conftest*
12901   eval "ac_cv_lib_$ac_lib_var=no"
12902 fi
12903 rm -f conftest*
12904 xe_check_libs=""
12905
12906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12907   echo "$ac_t""yes" 1>&6
12908   native_sound_lib="-laudio"
12909 else
12910   echo "$ac_t""no" 1>&6
12911 fi
12912
12913
12914       fi
12915       if test -n "$native_sound_lib"; then
12916         sound_found=yes sound_cflags=""
12917         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12918    echo "    xemacs will be linked with \"sgiplay.o\""
12919  fi
12920       fi ;;
12921     hppa*-hp-hpux* )
12922       if test -z "$native_sound_lib"; then
12923         
12924 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12925 echo "configure:12926: checking for AOpenAudio in -lAlib" >&5
12926 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12927
12928 xe_check_libs=" -lAlib "
12929 cat > conftest.$ac_ext <<EOF
12930 #line 12931 "configure"
12931 #include "confdefs.h"
12932 /* Override any gcc2 internal prototype to avoid an error.  */
12933 /* We use char because int might match the return type of a gcc2
12934     builtin and then its argument prototype would still apply.  */
12935 char AOpenAudio();
12936
12937 int main() {
12938 AOpenAudio()
12939 ; return 0; }
12940 EOF
12941 if { (eval echo configure:12942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12942   rm -rf conftest*
12943   eval "ac_cv_lib_$ac_lib_var=yes"
12944 else
12945   echo "configure: failed program was:" >&5
12946   cat conftest.$ac_ext >&5
12947   rm -rf conftest*
12948   eval "ac_cv_lib_$ac_lib_var=no"
12949 fi
12950 rm -f conftest*
12951 xe_check_libs=""
12952
12953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12954   echo "$ac_t""yes" 1>&6
12955   native_sound_lib="-lAlib"
12956 else
12957   echo "$ac_t""no" 1>&6
12958 fi
12959
12960
12961       fi
12962       if test -n "$native_sound_lib"; then
12963         sound_found=yes
12964         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12965    echo "    xemacs will be linked with \"hpplay.o\""
12966  fi
12967         if test "$GCC" = "yes" # Kludge city
12968           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12969           else sound_cflags="+e -I/usr/audio/examples"
12970         fi
12971       fi ;;
12972     esac
12973   fi
12974
12975     if test -z "$sound_found"; then
12976     for dir in "machine" "sys" "linux"; do
12977       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12978 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12979 echo "configure:12980: checking for ${dir}/soundcard.h" >&5
12980
12981 cat > conftest.$ac_ext <<EOF
12982 #line 12983 "configure"
12983 #include "confdefs.h"
12984 #include <${dir}/soundcard.h>
12985 EOF
12986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12987 { (eval echo configure:12988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12989 if test -z "$ac_err"; then
12990   rm -rf conftest*
12991   eval "ac_cv_header_$ac_safe=yes"
12992 else
12993   echo "$ac_err" >&5
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   eval "ac_cv_header_$ac_safe=no"
12998 fi
12999 rm -f conftest*
13000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13001   echo "$ac_t""yes" 1>&6
13002   sound_found=yes
13003        need_miscplay=yes
13004         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13005    echo "    xemacs will be linked with \"linuxplay.o\""
13006  fi
13007         { test "$extra_verbose" = "yes" && cat << EOF
13008     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13009 EOF
13010 cat >> confdefs.h <<EOF
13011 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13012 EOF
13013 }
13014
13015         break
13016 else
13017   echo "$ac_t""no" 1>&6
13018 fi
13019
13020     done
13021   fi
13022
13023     if test -z "$sound_found"; then
13024     if test "$with_msw" = "yes"; then
13025     sound_found=yes
13026     native_sound_lib=
13027     fi
13028   fi
13029
13030   test "$sound_found" = "yes" && with_native_sound=yes
13031 fi
13032
13033 if test "$with_native_sound" = "yes"; then
13034   { test "$extra_verbose" = "yes" && cat << \EOF
13035     Defining HAVE_NATIVE_SOUND
13036 EOF
13037 cat >> confdefs.h <<\EOF
13038 #define HAVE_NATIVE_SOUND 1
13039 EOF
13040 }
13041
13042   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13043 fi
13044
13045 if test "$with_nas_sound" != "no"; then
13046   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13047 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13048 echo "configure:13049: checking for audio/audiolib.h" >&5
13049
13050 cat > conftest.$ac_ext <<EOF
13051 #line 13052 "configure"
13052 #include "confdefs.h"
13053 #include <audio/audiolib.h>
13054 EOF
13055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13056 { (eval echo configure:13057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13058 if test -z "$ac_err"; then
13059   rm -rf conftest*
13060   eval "ac_cv_header_$ac_safe=yes"
13061 else
13062   echo "$ac_err" >&5
13063   echo "configure: failed program was:" >&5
13064   cat conftest.$ac_ext >&5
13065   rm -rf conftest*
13066   eval "ac_cv_header_$ac_safe=no"
13067 fi
13068 rm -f conftest*
13069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13070   echo "$ac_t""yes" 1>&6
13071   
13072     
13073 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13074 echo "configure:13075: checking for AuOpenServer in -laudio" >&5
13075 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13076
13077 xe_check_libs=" -laudio "
13078 cat > conftest.$ac_ext <<EOF
13079 #line 13080 "configure"
13080 #include "confdefs.h"
13081 /* Override any gcc2 internal prototype to avoid an error.  */
13082 /* We use char because int might match the return type of a gcc2
13083     builtin and then its argument prototype would still apply.  */
13084 char AuOpenServer();
13085
13086 int main() {
13087 AuOpenServer()
13088 ; return 0; }
13089 EOF
13090 if { (eval echo configure:13091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13091   rm -rf conftest*
13092   eval "ac_cv_lib_$ac_lib_var=yes"
13093 else
13094   echo "configure: failed program was:" >&5
13095   cat conftest.$ac_ext >&5
13096   rm -rf conftest*
13097   eval "ac_cv_lib_$ac_lib_var=no"
13098 fi
13099 rm -f conftest*
13100 xe_check_libs=""
13101
13102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13103   echo "$ac_t""yes" 1>&6
13104   have_nas_sound=yes
13105 else
13106   echo "$ac_t""no" 1>&6
13107 fi
13108
13109
13110 else
13111   echo "$ac_t""no" 1>&6
13112 fi
13113
13114   if test "$have_nas_sound" = "yes"; then
13115     with_nas_sound=yes
13116     { test "$extra_verbose" = "yes" && cat << \EOF
13117     Defining HAVE_NAS_SOUND
13118 EOF
13119 cat >> confdefs.h <<\EOF
13120 #define HAVE_NAS_SOUND 1
13121 EOF
13122 }
13123
13124     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13125    echo "    xemacs will be linked with \"nas.o\""
13126  fi
13127     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13128             cat > conftest.$ac_ext <<EOF
13129 #line 13130 "configure"
13130 #include "confdefs.h"
13131 #include <audio/Xtutil.h>
13132 EOF
13133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13134   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13135   :
13136 else
13137   rm -rf conftest*
13138   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13139     Defining NAS_NO_ERROR_JUMP
13140 EOF
13141 cat >> confdefs.h <<\EOF
13142 #define NAS_NO_ERROR_JUMP 1
13143 EOF
13144 }
13145
13146 fi
13147 rm -f conftest*
13148
13149   else
13150     test "$with_nas_sound" = "yes" && \
13151       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13152     with_nas_sound=no
13153   fi
13154 fi
13155
13156 if test "$with_esd_sound" != "no"; then
13157   # Extract the first word of "esd-config", so it can be a program name with args.
13158 set dummy esd-config; ac_word=$2
13159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13160 echo "configure:13161: checking for $ac_word" >&5
13161
13162 if test -n "$have_esd_config"; then
13163   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13164 else
13165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13166   ac_dummy="$PATH"
13167   for ac_dir in $ac_dummy; do
13168     test -z "$ac_dir" && ac_dir=.
13169     if test -f $ac_dir/$ac_word; then
13170       ac_cv_prog_have_esd_config="yes"
13171       break
13172     fi
13173   done
13174   IFS="$ac_save_ifs"
13175   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13176 fi
13177 have_esd_config="$ac_cv_prog_have_esd_config"
13178 if test -n "$have_esd_config"; then
13179   echo "$ac_t""$have_esd_config" 1>&6
13180 else
13181   echo "$ac_t""no" 1>&6
13182 fi
13183
13184   if test "$have_esd_config" = "yes"; then
13185     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13186     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
13187     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13188     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13189 echo "configure:13190: checking for esd_play_stream" >&5
13190
13191 cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 /* System header to define __stub macros and hopefully few prototypes,
13195     which can conflict with char esd_play_stream(); below.  */
13196 #include <assert.h>
13197 /* Override any gcc2 internal prototype to avoid an error.  */
13198 /* We use char because int might match the return type of a gcc2
13199     builtin and then its argument prototype would still apply.  */
13200 char esd_play_stream();
13201
13202 int main() {
13203
13204 /* The GNU C library defines this for functions which it implements
13205     to always fail with ENOSYS.  Some functions are actually named
13206     something starting with __ and the normal name is an alias.  */
13207 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13208 choke me
13209 #else
13210 esd_play_stream();
13211 #endif
13212
13213 ; return 0; }
13214 EOF
13215 if { (eval echo configure:13216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13216   rm -rf conftest*
13217   eval "ac_cv_func_esd_play_stream=yes"
13218 else
13219   echo "configure: failed program was:" >&5
13220   cat conftest.$ac_ext >&5
13221   rm -rf conftest*
13222   eval "ac_cv_func_esd_play_stream=no"
13223 fi
13224 rm -f conftest*
13225
13226 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13227   echo "$ac_t""yes" 1>&6
13228   have_esd_sound=yes
13229 else
13230   echo "$ac_t""no" 1>&6
13231 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13232 fi
13233
13234   fi
13235
13236   if test "$have_esd_sound" = "yes"; then
13237     with_esd_sound=yes
13238     need_miscplay=yes
13239     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13240    echo "    xemacs will be linked with \"esd.o\""
13241  fi
13242     { test "$extra_verbose" = "yes" && cat << \EOF
13243     Defining HAVE_ESD_SOUND
13244 EOF
13245 cat >> confdefs.h <<\EOF
13246 #define HAVE_ESD_SOUND 1
13247 EOF
13248 }
13249
13250   else
13251     test "$with_esd_sound" = "yes" && \
13252       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13253     with_esd_sound=no
13254   fi
13255 fi
13256
13257 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13258    echo "    xemacs will be linked with \"miscplay.o\""
13259  fi
13260
13261
13262 test -z "$with_tty" && with_tty=yes
13263
13264 if test "$with_tty" = "yes"  ; then
13265   echo "checking for TTY-related features" 1>&6
13266 echo "configure:13267: checking for TTY-related features" >&5
13267   { test "$extra_verbose" = "yes" && cat << \EOF
13268     Defining HAVE_TTY
13269 EOF
13270 cat >> confdefs.h <<\EOF
13271 #define HAVE_TTY 1
13272 EOF
13273 }
13274
13275   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
13276    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\""
13277  fi
13278
13279     if test -z "$with_ncurses"; then
13280     
13281 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13282 echo "configure:13283: checking for tgetent in -lncurses" >&5
13283 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13284
13285 xe_check_libs=" -lncurses "
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 /* Override any gcc2 internal prototype to avoid an error.  */
13290 /* We use char because int might match the return type of a gcc2
13291     builtin and then its argument prototype would still apply.  */
13292 char tgetent();
13293
13294 int main() {
13295 tgetent()
13296 ; return 0; }
13297 EOF
13298 if { (eval echo configure:13299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13299   rm -rf conftest*
13300   eval "ac_cv_lib_$ac_lib_var=yes"
13301 else
13302   echo "configure: failed program was:" >&5
13303   cat conftest.$ac_ext >&5
13304   rm -rf conftest*
13305   eval "ac_cv_lib_$ac_lib_var=no"
13306 fi
13307 rm -f conftest*
13308 xe_check_libs=""
13309
13310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13311   echo "$ac_t""yes" 1>&6
13312   with_ncurses=yes
13313 else
13314   echo "$ac_t""no" 1>&6
13315 with_ncurses=no
13316 fi
13317
13318
13319   fi
13320   if test "$with_ncurses" = "yes"; then
13321     { test "$extra_verbose" = "yes" && cat << \EOF
13322     Defining HAVE_NCURSES
13323 EOF
13324 cat >> confdefs.h <<\EOF
13325 #define HAVE_NCURSES 1
13326 EOF
13327 }
13328
13329     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13330 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13331 echo "configure:13332: checking for ncurses/curses.h" >&5
13332
13333 cat > conftest.$ac_ext <<EOF
13334 #line 13335 "configure"
13335 #include "confdefs.h"
13336 #include <ncurses/curses.h>
13337 EOF
13338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13339 { (eval echo configure:13340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13341 if test -z "$ac_err"; then
13342   rm -rf conftest*
13343   eval "ac_cv_header_$ac_safe=yes"
13344 else
13345   echo "$ac_err" >&5
13346   echo "configure: failed program was:" >&5
13347   cat conftest.$ac_ext >&5
13348   rm -rf conftest*
13349   eval "ac_cv_header_$ac_safe=no"
13350 fi
13351 rm -f conftest*
13352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13353   echo "$ac_t""yes" 1>&6
13354   curses_h_file=ncurses/curses.h
13355 else
13356   echo "$ac_t""no" 1>&6
13357 fi
13358
13359     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13360 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13361 echo "configure:13362: checking for ncurses/term.h" >&5
13362
13363 cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 #include <ncurses/term.h>
13367 EOF
13368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13369 { (eval echo configure:13370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13371 if test -z "$ac_err"; then
13372   rm -rf conftest*
13373   eval "ac_cv_header_$ac_safe=yes"
13374 else
13375   echo "$ac_err" >&5
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -rf conftest*
13379   eval "ac_cv_header_$ac_safe=no"
13380 fi
13381 rm -f conftest*
13382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13383   echo "$ac_t""yes" 1>&6
13384   term_h_file=ncurses/term.h
13385 else
13386   echo "$ac_t""no" 1>&6
13387 fi
13388
13389     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13390    echo "    xemacs will be linked with \"terminfo.o\""
13391  fi
13392     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13393
13394     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13395                         save_c_switch_site="$c_switch_site"
13396       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13397       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13398 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13399 echo "configure:13400: checking for ncurses/curses.h" >&5
13400
13401 cat > conftest.$ac_ext <<EOF
13402 #line 13403 "configure"
13403 #include "confdefs.h"
13404 #include <ncurses/curses.h>
13405 EOF
13406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13407 { (eval echo configure:13408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13409 if test -z "$ac_err"; then
13410   rm -rf conftest*
13411   eval "ac_cv_header_$ac_safe=yes"
13412 else
13413   echo "$ac_err" >&5
13414   echo "configure: failed program was:" >&5
13415   cat conftest.$ac_ext >&5
13416   rm -rf conftest*
13417   eval "ac_cv_header_$ac_safe=no"
13418 fi
13419 rm -f conftest*
13420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13421   echo "$ac_t""yes" 1>&6
13422   curses_h_file=ncurses/curses.h
13423 else
13424   echo "$ac_t""no" 1>&6
13425 fi
13426
13427       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13428         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13429         else c_switch_site="$save_c_switch_site"
13430       fi
13431     fi
13432   else         if test "$have_terminfo" = "yes"; then
13433       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13434    echo "    xemacs will be linked with \"terminfo.o\""
13435  fi
13436       if test -n "$libs_termcap"; then
13437         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13438       else
13439         for lib in curses termlib termcap; do
13440           
13441 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13442 echo "configure:13443: checking for tgetent in -l$lib" >&5
13443 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13444
13445 xe_check_libs=" -l$lib "
13446 cat > conftest.$ac_ext <<EOF
13447 #line 13448 "configure"
13448 #include "confdefs.h"
13449 /* Override any gcc2 internal prototype to avoid an error.  */
13450 /* We use char because int might match the return type of a gcc2
13451     builtin and then its argument prototype would still apply.  */
13452 char tgetent();
13453
13454 int main() {
13455 tgetent()
13456 ; return 0; }
13457 EOF
13458 if { (eval echo configure:13459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13459   rm -rf conftest*
13460   eval "ac_cv_lib_$ac_lib_var=yes"
13461 else
13462   echo "configure: failed program was:" >&5
13463   cat conftest.$ac_ext >&5
13464   rm -rf conftest*
13465   eval "ac_cv_lib_$ac_lib_var=no"
13466 fi
13467 rm -f conftest*
13468 xe_check_libs=""
13469
13470 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13471   echo "$ac_t""yes" 1>&6
13472   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13473 else
13474   echo "$ac_t""no" 1>&6
13475 fi
13476
13477
13478         done
13479       fi
13480     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13481    echo "    xemacs will be linked with \"tparam.o\""
13482  fi
13483                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13484       if test -n "$libs_termcap"; then
13485         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13486       else
13487         
13488 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13489 echo "configure:13490: checking for tgetent in -lcurses" >&5
13490 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13491
13492 xe_check_libs=" -lcurses "
13493 cat > conftest.$ac_ext <<EOF
13494 #line 13495 "configure"
13495 #include "confdefs.h"
13496 /* Override any gcc2 internal prototype to avoid an error.  */
13497 /* We use char because int might match the return type of a gcc2
13498     builtin and then its argument prototype would still apply.  */
13499 char tgetent();
13500
13501 int main() {
13502 tgetent()
13503 ; return 0; }
13504 EOF
13505 if { (eval echo configure:13506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13506   rm -rf conftest*
13507   eval "ac_cv_lib_$ac_lib_var=yes"
13508 else
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -rf conftest*
13512   eval "ac_cv_lib_$ac_lib_var=no"
13513 fi
13514 rm -f conftest*
13515 xe_check_libs=""
13516
13517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13518   echo "$ac_t""yes" 1>&6
13519   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13520 else
13521   echo "$ac_t""no" 1>&6
13522 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13523 echo "configure:13524: checking for tgetent in -ltermcap" >&5
13524 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13525
13526 xe_check_libs=" -ltermcap "
13527 cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 /* Override any gcc2 internal prototype to avoid an error.  */
13531 /* We use char because int might match the return type of a gcc2
13532     builtin and then its argument prototype would still apply.  */
13533 char tgetent();
13534
13535 int main() {
13536 tgetent()
13537 ; return 0; }
13538 EOF
13539 if { (eval echo configure:13540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13540   rm -rf conftest*
13541   eval "ac_cv_lib_$ac_lib_var=yes"
13542 else
13543   echo "configure: failed program was:" >&5
13544   cat conftest.$ac_ext >&5
13545   rm -rf conftest*
13546   eval "ac_cv_lib_$ac_lib_var=no"
13547 fi
13548 rm -f conftest*
13549 xe_check_libs=""
13550
13551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13552   echo "$ac_t""yes" 1>&6
13553   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13554 else
13555   echo "$ac_t""no" 1>&6
13556 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13557    echo "    xemacs will be linked with \"termcap.o\""
13558  fi
13559 fi
13560
13561
13562 fi
13563
13564
13565       fi
13566     fi
13567   fi
13568   { test "$extra_verbose" = "yes" && cat << EOF
13569     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13570 EOF
13571 cat >> confdefs.h <<EOF
13572 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13573 EOF
13574 }
13575
13576   { test "$extra_verbose" = "yes" && cat << EOF
13577     Defining TERM_H_FILE = "${term_h_file-term.h}"
13578 EOF
13579 cat >> confdefs.h <<EOF
13580 #define TERM_H_FILE "${term_h_file-term.h}"
13581 EOF
13582 }
13583
13584
13585     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13586 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13587 echo "configure:13588: checking for gpm.h" >&5
13588
13589 cat > conftest.$ac_ext <<EOF
13590 #line 13591 "configure"
13591 #include "confdefs.h"
13592 #include <gpm.h>
13593 EOF
13594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13595 { (eval echo configure:13596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13597 if test -z "$ac_err"; then
13598   rm -rf conftest*
13599   eval "ac_cv_header_$ac_safe=yes"
13600 else
13601   echo "$ac_err" >&5
13602   echo "configure: failed program was:" >&5
13603   cat conftest.$ac_ext >&5
13604   rm -rf conftest*
13605   eval "ac_cv_header_$ac_safe=no"
13606 fi
13607 rm -f conftest*
13608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13609   echo "$ac_t""yes" 1>&6
13610   :
13611 else
13612   echo "$ac_t""no" 1>&6
13613 with_gpm=no
13614 fi
13615  }
13616   test -z "$with_gpm" && { 
13617 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13618 echo "configure:13619: checking for Gpm_Open in -lgpm" >&5
13619 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13620
13621 xe_check_libs=" -lgpm "
13622 cat > conftest.$ac_ext <<EOF
13623 #line 13624 "configure"
13624 #include "confdefs.h"
13625 /* Override any gcc2 internal prototype to avoid an error.  */
13626 /* We use char because int might match the return type of a gcc2
13627     builtin and then its argument prototype would still apply.  */
13628 char Gpm_Open();
13629
13630 int main() {
13631 Gpm_Open()
13632 ; return 0; }
13633 EOF
13634 if { (eval echo configure:13635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13635   rm -rf conftest*
13636   eval "ac_cv_lib_$ac_lib_var=yes"
13637 else
13638   echo "configure: failed program was:" >&5
13639   cat conftest.$ac_ext >&5
13640   rm -rf conftest*
13641   eval "ac_cv_lib_$ac_lib_var=no"
13642 fi
13643 rm -f conftest*
13644 xe_check_libs=""
13645
13646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13647   echo "$ac_t""yes" 1>&6
13648   with_gpm=yes
13649 else
13650   echo "$ac_t""no" 1>&6
13651 with_gpm=no
13652 fi
13653
13654  }
13655   if test "$with_gpm" = "yes"; then
13656     { test "$extra_verbose" = "yes" && cat << \EOF
13657     Defining HAVE_GPM
13658 EOF
13659 cat >> confdefs.h <<\EOF
13660 #define HAVE_GPM 1
13661 EOF
13662 }
13663
13664     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13665    echo "    xemacs will be linked with \"gpmevent.o\""
13666  fi
13667     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13668   fi
13669
13670 else   for feature in ncurses gpm; do
13671     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13672       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13673     fi
13674     eval "with_${feature}=no"
13675   done
13676 fi 
13677 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13678    echo "    xemacs will be linked with \"event-unixoid.o\""
13679  fi
13680
13681
13682 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13683   != "no no no" && echo "checking for database support" 1>&6
13684 echo "configure:13685: checking for database support" >&5
13685
13686 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13687   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13688 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13689 echo "configure:13690: checking for ndbm.h" >&5
13690
13691 cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 #include <ndbm.h>
13695 EOF
13696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13697 { (eval echo configure:13698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13699 if test -z "$ac_err"; then
13700   rm -rf conftest*
13701   eval "ac_cv_header_$ac_safe=yes"
13702 else
13703   echo "$ac_err" >&5
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   eval "ac_cv_header_$ac_safe=no"
13708 fi
13709 rm -f conftest*
13710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13711   echo "$ac_t""yes" 1>&6
13712   :
13713 else
13714   echo "$ac_t""no" 1>&6
13715
13716     test "$with_database_gdbm" = "yes" -o \
13717          "$with_database_dbm"  = "yes" && \
13718       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13719     with_database_gdbm=no with_database_dbm=no
13720 fi
13721
13722 fi
13723
13724 if test "$with_database_gdbm" != "no"; then
13725   
13726 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13727 echo "configure:13728: checking for dbm_open in -lgdbm" >&5
13728 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13729
13730 xe_check_libs=" -lgdbm "
13731 cat > conftest.$ac_ext <<EOF
13732 #line 13733 "configure"
13733 #include "confdefs.h"
13734 /* Override any gcc2 internal prototype to avoid an error.  */
13735 /* We use char because int might match the return type of a gcc2
13736     builtin and then its argument prototype would still apply.  */
13737 char dbm_open();
13738
13739 int main() {
13740 dbm_open()
13741 ; return 0; }
13742 EOF
13743 if { (eval echo configure:13744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13744   rm -rf conftest*
13745   eval "ac_cv_lib_$ac_lib_var=yes"
13746 else
13747   echo "configure: failed program was:" >&5
13748   cat conftest.$ac_ext >&5
13749   rm -rf conftest*
13750   eval "ac_cv_lib_$ac_lib_var=no"
13751 fi
13752 rm -f conftest*
13753 xe_check_libs=""
13754
13755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13756   echo "$ac_t""yes" 1>&6
13757   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13758 else
13759   echo "$ac_t""no" 1>&6
13760 if test "$with_database_gdbm" = "yes"; then
13761      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13762    fi
13763    with_database_gdbm=no
13764 fi
13765
13766
13767 fi
13768
13769 if test "$with_database_dbm" != "no"; then
13770   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13771 echo "configure:13772: checking for dbm_open" >&5
13772
13773 cat > conftest.$ac_ext <<EOF
13774 #line 13775 "configure"
13775 #include "confdefs.h"
13776 /* System header to define __stub macros and hopefully few prototypes,
13777     which can conflict with char dbm_open(); below.  */
13778 #include <assert.h>
13779 /* Override any gcc2 internal prototype to avoid an error.  */
13780 /* We use char because int might match the return type of a gcc2
13781     builtin and then its argument prototype would still apply.  */
13782 char dbm_open();
13783
13784 int main() {
13785
13786 /* The GNU C library defines this for functions which it implements
13787     to always fail with ENOSYS.  Some functions are actually named
13788     something starting with __ and the normal name is an alias.  */
13789 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13790 choke me
13791 #else
13792 dbm_open();
13793 #endif
13794
13795 ; return 0; }
13796 EOF
13797 if { (eval echo configure:13798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13798   rm -rf conftest*
13799   eval "ac_cv_func_dbm_open=yes"
13800 else
13801   echo "configure: failed program was:" >&5
13802   cat conftest.$ac_ext >&5
13803   rm -rf conftest*
13804   eval "ac_cv_func_dbm_open=no"
13805 fi
13806 rm -f conftest*
13807
13808 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13809   echo "$ac_t""yes" 1>&6
13810   with_database_dbm=yes libdbm=
13811 else
13812   echo "$ac_t""no" 1>&6
13813
13814     
13815 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13816 echo "configure:13817: checking for dbm_open in -ldbm" >&5
13817 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13818
13819 xe_check_libs=" -ldbm "
13820 cat > conftest.$ac_ext <<EOF
13821 #line 13822 "configure"
13822 #include "confdefs.h"
13823 /* Override any gcc2 internal prototype to avoid an error.  */
13824 /* We use char because int might match the return type of a gcc2
13825     builtin and then its argument prototype would still apply.  */
13826 char dbm_open();
13827
13828 int main() {
13829 dbm_open()
13830 ; return 0; }
13831 EOF
13832 if { (eval echo configure:13833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13833   rm -rf conftest*
13834   eval "ac_cv_lib_$ac_lib_var=yes"
13835 else
13836   echo "configure: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   rm -rf conftest*
13839   eval "ac_cv_lib_$ac_lib_var=no"
13840 fi
13841 rm -f conftest*
13842 xe_check_libs=""
13843
13844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13845   echo "$ac_t""yes" 1>&6
13846   with_database_dbm=yes libdbm=-ldbm
13847 else
13848   echo "$ac_t""no" 1>&6
13849 test "$with_database_dbm" = "yes" && \
13850         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13851       with_database_dbm=no
13852 fi
13853
13854
13855 fi
13856
13857 fi
13858
13859 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13860 test "$with_database_gdbm" = "yes" -o \
13861      "$with_database_dbm"  = "yes" && \
13862   { test "$extra_verbose" = "yes" && cat << \EOF
13863     Defining HAVE_DBM
13864 EOF
13865 cat >> confdefs.h <<\EOF
13866 #define HAVE_DBM 1
13867 EOF
13868 }
13869
13870
13871 if test "$with_database_berkdb" != "no"; then
13872   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13873 echo "configure:13874: checking for Berkeley db.h" >&5
13874   for header in "db/db.h" "db.h"; do
13875     cat > conftest.$ac_ext <<EOF
13876 #line 13877 "configure"
13877 #include "confdefs.h"
13878
13879 #include <stdlib.h>
13880 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13881 #ifdef HAVE_INTTYPES_H
13882 #define __BIT_TYPES_DEFINED__
13883 #include <inttypes.h>
13884 typedef uint8_t  u_int8_t;
13885 typedef uint16_t u_int16_t;
13886 typedef uint32_t u_int32_t;
13887 #ifdef WE_DONT_NEED_QUADS
13888 typedef uint64_t u_int64_t;
13889 #endif
13890 #endif
13891 #endif
13892 #include <$header>
13893
13894 int main() {
13895
13896 ; return 0; }
13897 EOF
13898 if { (eval echo configure:13899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13899   rm -rf conftest*
13900   db_h_file="$header"; break
13901 else
13902   echo "configure: failed program was:" >&5
13903   cat conftest.$ac_ext >&5
13904 fi
13905 rm -f conftest*
13906   done
13907   if test -z "$db_h_file"
13908   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13909   else echo "$ac_t""$db_h_file" 1>&6
13910   fi
13911
13912   if test "$with_database_berkdb" != "no"; then
13913     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13914 echo "configure:13915: checking for Berkeley DB version" >&5
13915     cat > conftest.$ac_ext <<EOF
13916 #line 13917 "configure"
13917 #include "confdefs.h"
13918 #include <$db_h_file>
13919 #if DB_VERSION_MAJOR > 1
13920 yes
13921 #endif
13922
13923 EOF
13924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13925   egrep "yes" >/dev/null 2>&1; then
13926   rm -rf conftest*
13927   cat > conftest.$ac_ext <<EOF
13928 #line 13929 "configure"
13929 #include "confdefs.h"
13930 #include <$db_h_file>
13931 #if DB_VERSION_MAJOR > 2
13932 yes
13933 #endif
13934
13935 EOF
13936 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13937   egrep "yes" >/dev/null 2>&1; then
13938   rm -rf conftest*
13939   echo "$ac_t""3" 1>&6; dbfunc=db_create
13940 else
13941   rm -rf conftest*
13942   
13943     echo "$ac_t""2" 1>&6; dbfunc=db_open
13944 fi
13945 rm -f conftest*
13946
13947 else
13948   rm -rf conftest*
13949   
13950     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13951 fi
13952 rm -f conftest*
13953
13954     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13955 echo "configure:13956: checking for $dbfunc" >&5
13956
13957 cat > conftest.$ac_ext <<EOF
13958 #line 13959 "configure"
13959 #include "confdefs.h"
13960 /* System header to define __stub macros and hopefully few prototypes,
13961     which can conflict with char $dbfunc(); below.  */
13962 #include <assert.h>
13963 /* Override any gcc2 internal prototype to avoid an error.  */
13964 /* We use char because int might match the return type of a gcc2
13965     builtin and then its argument prototype would still apply.  */
13966 char $dbfunc();
13967
13968 int main() {
13969
13970 /* The GNU C library defines this for functions which it implements
13971     to always fail with ENOSYS.  Some functions are actually named
13972     something starting with __ and the normal name is an alias.  */
13973 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13974 choke me
13975 #else
13976 $dbfunc();
13977 #endif
13978
13979 ; return 0; }
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13982   rm -rf conftest*
13983   eval "ac_cv_func_$dbfunc=yes"
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   eval "ac_cv_func_$dbfunc=no"
13989 fi
13990 rm -f conftest*
13991
13992 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13993   echo "$ac_t""yes" 1>&6
13994   with_database_berkdb=yes need_libdb=no
13995 else
13996   echo "$ac_t""no" 1>&6
13997
13998     
13999 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14000 echo "configure:14001: checking for $dbfunc in -ldb" >&5
14001 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14002
14003 xe_check_libs=" -ldb "
14004 cat > conftest.$ac_ext <<EOF
14005 #line 14006 "configure"
14006 #include "confdefs.h"
14007 /* Override any gcc2 internal prototype to avoid an error.  */
14008 /* We use char because int might match the return type of a gcc2
14009     builtin and then its argument prototype would still apply.  */
14010 char $dbfunc();
14011
14012 int main() {
14013 $dbfunc()
14014 ; return 0; }
14015 EOF
14016 if { (eval echo configure:14017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14017   rm -rf conftest*
14018   eval "ac_cv_lib_$ac_lib_var=yes"
14019 else
14020   echo "configure: failed program was:" >&5
14021   cat conftest.$ac_ext >&5
14022   rm -rf conftest*
14023   eval "ac_cv_lib_$ac_lib_var=no"
14024 fi
14025 rm -f conftest*
14026 xe_check_libs=""
14027
14028 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14029   echo "$ac_t""yes" 1>&6
14030   with_database_berkdb=yes need_libdb=yes
14031 else
14032   echo "$ac_t""no" 1>&6
14033 fi
14034
14035
14036 fi
14037
14038   fi
14039
14040   if test "$with_database_berkdb" = "yes"; then
14041     { test "$extra_verbose" = "yes" && cat << EOF
14042     Defining DB_H_FILE = "$db_h_file"
14043 EOF
14044 cat >> confdefs.h <<EOF
14045 #define DB_H_FILE "$db_h_file"
14046 EOF
14047 }
14048
14049     { test "$extra_verbose" = "yes" && cat << \EOF
14050     Defining HAVE_BERKELEY_DB
14051 EOF
14052 cat >> confdefs.h <<\EOF
14053 #define HAVE_BERKELEY_DB 1
14054 EOF
14055 }
14056
14057     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14058   else with_database_berkdb=no
14059   fi
14060 fi
14061
14062 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14063      != "no no no"; then
14064   { test "$extra_verbose" = "yes" && cat << \EOF
14065     Defining HAVE_DATABASE
14066 EOF
14067 cat >> confdefs.h <<\EOF
14068 #define HAVE_DATABASE 1
14069 EOF
14070 }
14071
14072   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14073    echo "    xemacs will be linked with \"database.o\""
14074  fi
14075 fi
14076
14077 if test "$with_socks" = "yes"; then
14078   
14079 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14080 echo "configure:14081: checking for SOCKSinit in -lsocks" >&5
14081 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14082
14083 xe_check_libs=" -lsocks "
14084 cat > conftest.$ac_ext <<EOF
14085 #line 14086 "configure"
14086 #include "confdefs.h"
14087 /* Override any gcc2 internal prototype to avoid an error.  */
14088 /* We use char because int might match the return type of a gcc2
14089     builtin and then its argument prototype would still apply.  */
14090 char SOCKSinit();
14091
14092 int main() {
14093 SOCKSinit()
14094 ; return 0; }
14095 EOF
14096 if { (eval echo configure:14097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14097   rm -rf conftest*
14098   eval "ac_cv_lib_$ac_lib_var=yes"
14099 else
14100   echo "configure: failed program was:" >&5
14101   cat conftest.$ac_ext >&5
14102   rm -rf conftest*
14103   eval "ac_cv_lib_$ac_lib_var=no"
14104 fi
14105 rm -f conftest*
14106 xe_check_libs=""
14107
14108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14109   echo "$ac_t""yes" 1>&6
14110     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14111     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14112   { test "$extra_verbose" = "yes" && cat << EOF
14113     Defining $ac_tr_lib
14114 EOF
14115 cat >> confdefs.h <<EOF
14116 #define $ac_tr_lib 1
14117 EOF
14118 }
14119
14120   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14121
14122 else
14123   echo "$ac_t""no" 1>&6
14124 fi
14125
14126
14127   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14128     Defining HAVE_SOCKS
14129 EOF
14130 cat >> confdefs.h <<\EOF
14131 #define HAVE_SOCKS 1
14132 EOF
14133 }
14134
14135 fi
14136
14137 if test "$usage_tracking" = "yes"; then
14138   { test "$extra_verbose" = "yes" && cat << \EOF
14139     Defining USAGE_TRACKING
14140 EOF
14141 cat >> confdefs.h <<\EOF
14142 #define USAGE_TRACKING 1
14143 EOF
14144 }
14145
14146   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14147 fi
14148
14149 if test "$with_modules" != "no"; then
14150   echo "checking for module support" 1>&6
14151 echo "configure:14152: checking for module support" >&5
14152
14153     if test "$with_msw" = "yes"; then
14154     have_dl=yes;
14155   else
14156         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14157 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14158 echo "configure:14159: checking for dlfcn.h" >&5
14159
14160 cat > conftest.$ac_ext <<EOF
14161 #line 14162 "configure"
14162 #include "confdefs.h"
14163 #include <dlfcn.h>
14164 EOF
14165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14166 { (eval echo configure:14167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14168 if test -z "$ac_err"; then
14169   rm -rf conftest*
14170   eval "ac_cv_header_$ac_safe=yes"
14171 else
14172   echo "$ac_err" >&5
14173   echo "configure: failed program was:" >&5
14174   cat conftest.$ac_ext >&5
14175   rm -rf conftest*
14176   eval "ac_cv_header_$ac_safe=no"
14177 fi
14178 rm -f conftest*
14179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14180   echo "$ac_t""yes" 1>&6
14181   
14182       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14183 echo "configure:14184: checking for dlopen in -lc" >&5
14184       cat > conftest.$ac_ext <<EOF
14185 #line 14186 "configure"
14186 #include "confdefs.h"
14187 #include <dlfcn.h>
14188 int main() {
14189         dlopen ("", 0);
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14193   rm -rf conftest*
14194    have_dl=yes 
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   
14200       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14201 echo "configure:14202: checking for dlopen in -ldl" >&5
14202       ac_save_LIBS="$LIBS"
14203       LIBS="-ldl $LIBS"
14204       cat > conftest.$ac_ext <<EOF
14205 #line 14206 "configure"
14206 #include "confdefs.h"
14207 #include <dlfcn.h>
14208 int main() {
14209         dlopen ("", 0);
14210 ; return 0; }
14211 EOF
14212 if { (eval echo configure:14213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14213   rm -rf conftest*
14214    have_dl=yes 
14215 else
14216   echo "configure: failed program was:" >&5
14217   cat conftest.$ac_ext >&5
14218   rm -rf conftest*
14219   LIBS="$ac_save_LIBS"
14220 fi
14221 rm -f conftest*
14222       ac_save_LIBS=
14223 fi
14224 rm -f conftest*
14225 else
14226   echo "$ac_t""no" 1>&6
14227 fi
14228
14229     if test -n "$have_dl"; then
14230       { test "$extra_verbose" = "yes" && cat << \EOF
14231     Defining HAVE_DLOPEN
14232 EOF
14233 cat >> confdefs.h <<\EOF
14234 #define HAVE_DLOPEN 1
14235 EOF
14236 }
14237
14238     else
14239       
14240 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14241 echo "configure:14242: checking for shl_load in -ldld" >&5
14242 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14243
14244 xe_check_libs=" -ldld "
14245 cat > conftest.$ac_ext <<EOF
14246 #line 14247 "configure"
14247 #include "confdefs.h"
14248 /* Override any gcc2 internal prototype to avoid an error.  */
14249 /* We use char because int might match the return type of a gcc2
14250     builtin and then its argument prototype would still apply.  */
14251 char shl_load();
14252
14253 int main() {
14254 shl_load()
14255 ; return 0; }
14256 EOF
14257 if { (eval echo configure:14258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14258   rm -rf conftest*
14259   eval "ac_cv_lib_$ac_lib_var=yes"
14260 else
14261   echo "configure: failed program was:" >&5
14262   cat conftest.$ac_ext >&5
14263   rm -rf conftest*
14264   eval "ac_cv_lib_$ac_lib_var=no"
14265 fi
14266 rm -f conftest*
14267 xe_check_libs=""
14268
14269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14270   echo "$ac_t""yes" 1>&6
14271   libdl=dld have_dl=yes;
14272         { test "$extra_verbose" = "yes" && cat << \EOF
14273     Defining HAVE_SHL_LOAD
14274 EOF
14275 cat >> confdefs.h <<\EOF
14276 #define HAVE_SHL_LOAD 1
14277 EOF
14278 }
14279
14280 else
14281   echo "$ac_t""no" 1>&6
14282
14283 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14284 echo "configure:14285: checking for dld_init in -ldld" >&5
14285 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14286
14287 xe_check_libs=" -ldld "
14288 cat > conftest.$ac_ext <<EOF
14289 #line 14290 "configure"
14290 #include "confdefs.h"
14291 /* Override any gcc2 internal prototype to avoid an error.  */
14292 /* We use char because int might match the return type of a gcc2
14293     builtin and then its argument prototype would still apply.  */
14294 char dld_init();
14295
14296 int main() {
14297 dld_init()
14298 ; return 0; }
14299 EOF
14300 if { (eval echo configure:14301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14301   rm -rf conftest*
14302   eval "ac_cv_lib_$ac_lib_var=yes"
14303 else
14304   echo "configure: failed program was:" >&5
14305   cat conftest.$ac_ext >&5
14306   rm -rf conftest*
14307   eval "ac_cv_lib_$ac_lib_var=no"
14308 fi
14309 rm -f conftest*
14310 xe_check_libs=""
14311
14312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14313   echo "$ac_t""yes" 1>&6
14314   libdl=dld have_dl=yes;
14315         { test "$extra_verbose" = "yes" && cat << \EOF
14316     Defining HAVE_DLD_INIT
14317 EOF
14318 cat >> confdefs.h <<\EOF
14319 #define HAVE_DLD_INIT 1
14320 EOF
14321 }
14322
14323 else
14324   echo "$ac_t""no" 1>&6
14325 fi
14326
14327
14328 fi
14329
14330
14331     fi
14332   fi 
14333   if test -n "$have_dl"; then
14334         
14335 dll_ld=
14336 dll_ldflags=
14337 dll_cflags=
14338 dll_post=
14339 dll_ldo="-o"
14340 ld_dynamic_link_flags=
14341 xehost=$canonical
14342 xealias=$internal_configuration
14343
14344 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14345 echo "configure:14346: checking how to build dynamic libraries for ${xehost}" >&5
14346 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14347 case "$xehost" in
14348 *-*-linux-gnu*) ;;
14349 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14350 esac
14351
14352 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14353 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14354 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14355
14356 case "$xehost_os" in
14357 aix3*)
14358   # AIX sometimes has problems with the GCC collect2 program.  For some
14359   # reason, if we set the COLLECT_NAMES environment variable, the problems
14360   # vanish in a puff of smoke.
14361   if test "${COLLECT_NAMES+set}" != set; then
14362     COLLECT_NAMES=
14363     export COLLECT_NAMES
14364   fi
14365   ;;
14366 esac
14367
14368 # Now see if the compiler is really GCC.
14369 if test "$GCC" = "yes"; then
14370   XEGCC=yes
14371 else
14372   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14373 echo "configure:14374: checking checking whether we are using GNU C" >&5
14374   cat > conftest.$ac_ext <<EOF
14375 #line 14376 "configure"
14376 #include "confdefs.h"
14377
14378 #ifdef __GNUC__
14379   yes;
14380 #endif
14381
14382 EOF
14383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14384   egrep "yes" >/dev/null 2>&1; then
14385   rm -rf conftest*
14386   XEGCC=yes
14387 else
14388   rm -rf conftest*
14389   XEGCC=no
14390 fi
14391 rm -f conftest*
14392
14393   echo "$ac_t""${XEGCC}" 1>&6
14394 fi
14395
14396 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14397 echo "configure:14398: checking how to produce PIC code" >&5
14398 wl=
14399
14400 can_build_shared=yes
14401 if test "$XEGCC" = yes; then
14402   wl='-Wl,'
14403
14404   case "$xehost_os" in
14405   aix[3-9]* | irix[5-9]* | osf[3-9])
14406     # PIC is the default for these OSes.
14407     ;;
14408
14409   os2*)
14410     # We can build DLLs from non-PIC.
14411     ;;
14412   amigaos*)
14413     # FIXME: we need at least 68020 code to build shared libraries, but
14414     # adding the `-m68020' flag to GCC prevents building anything better,
14415     # like `-m68040'.
14416     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14417     ;;
14418   *cygwin* | *mingw* )
14419     # PIC is the default
14420     ;;
14421   *)
14422     dll_cflags='-fPIC'
14423     ;;
14424   esac
14425 else
14426   # PORTME Check for PIC flags for the system compiler.
14427   case "$xehost_os" in
14428   hpux9* | hpux1[0-9]*)
14429     # Is there a better link_static_flag that works with the bundled CC?
14430     wl='-Wl,'
14431     dll_cflags='+Z'
14432     ;;
14433
14434   irix[5-9]*)
14435     wl='-Wl,'
14436     # PIC (with -KPIC) is the default.
14437     ;;
14438
14439   os2*)
14440     # We can build DLLs from non-PIC.
14441     ;;
14442
14443   osf[3-9]*)
14444     # All OSF/1 code is PIC.
14445     wl='-Wl,'
14446     ;;
14447
14448   aix[3-9]*)
14449     # All AIX code is PIC.
14450     wl='-Wl,'
14451     ;;
14452
14453   sco3.2v5*)
14454     dll_cflags='-belf -Kpic'
14455     wl='-Wl,'
14456     ;;
14457
14458   unixware*)
14459     dll_cflags="-KPIC"
14460     wl="-Wl,"
14461     ;;
14462
14463   sysv4*)
14464     dll_cflags="-KPIC"
14465     wl="-Wl,"
14466     ;;
14467
14468   sysv5*)
14469     dll_cflags="-KPIC"
14470     wl="-Wl,"
14471     ;;
14472
14473   solaris2*)
14474     dll_cflags='-KPIC'
14475     wl='-Wl,'
14476     ;;
14477
14478   sunos4*)
14479     dll_cflags='-PIC'
14480     wl='-Qoption ld '
14481     ;;
14482
14483   uts4*)
14484     dll_cflags='-pic'
14485     ;;
14486
14487   *)
14488     can_build_shared=no
14489     ;;
14490   esac
14491 fi
14492
14493 if test -n "$dll_cflags"; then
14494   echo "$ac_t""${dll_cflags}" 1>&6
14495
14496   # Check to make sure the dll_cflags actually works.
14497   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14498 echo "configure:14499: checking if PIC flag ${dll_cflags} really works" >&5
14499   save_CFLAGS="$CFLAGS"
14500   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14501   cat > conftest.$ac_ext <<EOF
14502 #line 14503 "configure"
14503 #include "confdefs.h"
14504
14505 int main() {
14506 int x=0;
14507 ; return 0; }
14508 EOF
14509 if { (eval echo configure:14510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14510   rm -rf conftest*
14511   
14512     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14513     # reports no error.  So, we need to grep stderr for (Bundled).
14514     if grep '(Bundled)' config.log >/dev/null; then
14515       echo "$ac_t""no" 1>&6
14516       can_build_shared=no
14517       dll_cflags=
14518     else
14519       echo "$ac_t""yes" 1>&6
14520     fi
14521 else
14522   echo "configure: failed program was:" >&5
14523   cat conftest.$ac_ext >&5
14524   rm -rf conftest*
14525   echo "$ac_t""no" 1>&6
14526     can_build_shared=no
14527     dll_cflags=
14528 fi
14529 rm -f conftest*
14530   CFLAGS="$save_CFLAGS"
14531 else
14532   echo "$ac_t""none" 1>&6
14533 fi
14534
14535 if test "$can_build_shared" = "yes"; then
14536 cc_produces_so=no
14537 xldf=
14538 xcldf=
14539 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14540 echo "configure:14541: checking if C compiler can produce shared libraries" >&5
14541 if test "$XEGCC" = yes; then
14542   xcldf="-shared"
14543   xldf="-shared"
14544 else # Not using GCC
14545   case "$xehost_os" in
14546     aix[3-9]*)
14547       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14548       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14549       ;;
14550
14551     freebsd2* | netbsd* | openbsd*)
14552       xldf="-Bshareable"
14553       xcldf="${wl}-Bshareable"
14554       ;;
14555
14556     freebsd3*)
14557       xcldf="-shared"
14558       ;;
14559
14560     hpux*)
14561       xldf="-b +s"
14562       xcldf="${wl}-b ${wl}+s"
14563       ;;
14564
14565     irix[5-9]* | osf[3-9]*)
14566       xcldf="${wl}-shared"
14567       xldf="-shared"
14568       ;;
14569
14570     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14571       xcldf="-G"
14572       xldf="-G"
14573       ;;
14574
14575     sunos4*)
14576       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14577       xldf="-assert pure-text -Bstatic"
14578       ;;
14579   esac
14580 fi # End if if we are using gcc
14581
14582 if test -n "$xcldf"; then
14583   save_LDFLAGS=$LDFLAGS
14584   save_LIBS=$LIBS
14585   save_xe_libs=$xe_libs
14586   LDFLAGS="$xcldf $LDFLAGS"
14587   LIBS=
14588   xe_libs=
14589   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14590   cat > conftest.$ac_ext <<EOF
14591 #line 14592 "configure"
14592 #include "confdefs.h"
14593
14594 int main() {
14595 int x=0;
14596 ; return 0; }
14597 EOF
14598 if { (eval echo configure:14599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14599   rm -rf conftest*
14600   cc_produces_so=yes
14601 else
14602   echo "configure: failed program was:" >&5
14603   cat conftest.$ac_ext >&5
14604   rm -rf conftest*
14605   cc_produces_so=no
14606 fi
14607 rm -f conftest*
14608   LDFLAGS=$save_LDFLAGS
14609   LIBS=$save_LIBS
14610   xe_libs=$save_xe_libs
14611   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14612 else
14613   cc_produces_so=no
14614 fi
14615 echo "$ac_t""${cc_produces_so}" 1>&6
14616
14617 LTLD=$LD
14618 if test -z "$LTLD"; then
14619   ac_prog=ld
14620   if test "$XEGCC" = yes; then
14621     # Check if gcc -print-prog-name=ld gives a path.
14622     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14623 echo "configure:14624: checking for ld used by GCC" >&5
14624     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14625     case "$ac_prog" in
14626     # Accept absolute paths.
14627     /*)
14628       if test -z "$LTLD"; then
14629         case "$ac_prog" in
14630           *gcc-lib*) LTLD="$CC"
14631                      ;;
14632           *)         LTLD="$ac_prog"
14633                      ;;
14634         esac
14635       fi
14636       ;;
14637     "")
14638       # If it fails, then pretend we aren't using GCC.
14639       ac_prog=ld
14640       ;;
14641     *)
14642       # If it is relative, then search for the first ld in PATH.
14643       with_gnu_ld=unknown
14644       ;;
14645     esac
14646   else
14647     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14648 echo "configure:14649: checking for GNU ld" >&5
14649   fi
14650
14651   if test -z "$LTLD"; then
14652     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14653     for ac_dir in $PATH; do
14654       test -z "$ac_dir" && ac_dir=.
14655       if test -f "$ac_dir/$ac_prog"; then
14656         LTLD="$ac_dir/$ac_prog"
14657         # Check to see if the program is GNU ld.  I'd rather use --version,
14658         # but apparently some GNU ld's only accept -v.
14659         # Break only if it was the GNU/non-GNU ld that we prefer.
14660         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14661           xe_gnu_ld=yes
14662         else
14663           xe_gnu_ld=no
14664         fi
14665       fi
14666     done
14667     IFS="$ac_save_ifs"
14668   fi
14669
14670   if test -n "$LTLD"; then
14671     echo "$ac_t""${LTLD}" 1>&6
14672   else
14673     echo "$ac_t""no" 1>&6
14674   fi
14675
14676   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14677     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14678     exit 1
14679   fi
14680 fi
14681
14682 ld_dynamic_link_flags=
14683
14684 # Check to see if it really is or isn't GNU ld.
14685 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14686 echo "configure:14687: checking if the linker is GNU ld" >&5
14687 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14688 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14689   xe_gnu_ld=yes
14690 else
14691   xe_gnu_ld=no
14692 fi
14693 echo "$ac_t""${xe_gnu_ld}" 1>&6
14694
14695 case "$xehost_os" in
14696   amigaos* | sunos4*)
14697     # On these operating systems, we should treat GNU ld like the system ld.
14698     gnu_ld_acts_native=yes
14699     ;;
14700   *)
14701     gnu_ld_acts_native=no
14702     ;;
14703 esac
14704
14705 if test "$cc_produces_so" = "yes"; then
14706   dll_ld=$CC
14707   dll_ldflags=$xcldf
14708   can_build_shared=yes
14709   ld_shlibs=yes
14710 else
14711   # OK - only NOW do we futz about with ld.
14712   # See if the linker supports building shared libraries.
14713   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14714 echo "configure:14715: checking whether the linker supports shared libraries" >&5
14715   dll_ld=$CC
14716   dll_ldflags=$LDFLAGS
14717   ld_shlibs=yes
14718   can_build_shared=yes
14719   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14720     # See if GNU ld supports shared libraries.
14721     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14722       dll_ld=$CC
14723       dll_ldflags="-shared"
14724       ld_shlibs=yes
14725     else
14726       ld_shlibs=no
14727     fi
14728   else
14729     # PORTME fill in a description of your system's linker (not GNU ld)
14730     case "$xehost_os" in
14731     aix3*)
14732       dll_ld=$LTLD
14733       dll_ldflags=$xldf
14734       ;;
14735
14736     aix[4-9]*)
14737       dll_ldflags=$xcldf
14738       ;;
14739
14740     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14741     # support.  Future versions do this automatically, but an explicit c++rt0.o
14742     # doesn't break anything, and helps significantly (at the cost of a little
14743     # extra space).
14744     freebsd2.2*)
14745       dll_ld=$LTLD
14746       dll_ldflags=$xldf
14747       dll_post="/usr/lib/c++rt0.o"
14748       ;;
14749
14750     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14751     freebsd2*)
14752       dll_ld=$LTLD
14753       dll_ldflags="-Bshareable"
14754       ;;
14755
14756     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14757     freebsd3*)
14758       dll_ldflags="-shared"
14759       ;;
14760
14761     hpux*)
14762       dll_ld=$LTLD
14763       dll_ldflags=$xldf
14764       ;;
14765
14766     irix[5-9]*)
14767       dll_ld=$LTLD
14768       dll_ldflags=$xldf
14769       ;;
14770
14771     netbsd*)
14772       # Tested with NetBSD 1.2 ld
14773       dll_ld=$LTLD
14774       dll_ldflags=$xldf
14775       ;;
14776
14777     openbsd*)
14778       dll_ld=$LTLD
14779       dll_ldflags=$xldf
14780       ;;
14781
14782     osf3* | osf4*)
14783       dll_ld=$LTLD
14784       dll_ldflags=$xldf
14785       ;;
14786
14787     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14788     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14789       dll_ld=$LTLD
14790       case "$dll_ld" in
14791         *gcc*) dll_ldflags="-shared"
14792                dll_ld=$CC
14793                ;;
14794         *)     dll_ldflags="-G"
14795                ;;
14796       esac
14797       ;;
14798
14799     sunos4*)
14800       if test "$XEGCC" = yes; then
14801         dll_ld=$CC
14802       else
14803         dll_ld=$LTLD
14804       fi
14805       dll_ldflags=$xldf
14806       ;;
14807
14808     uts4*)
14809       dll_ld=$LTLD
14810       dll_ldflags="-G"
14811       ;;
14812
14813     bsdi*)
14814       dll_ldflags="-r"
14815       dll_ld="shlicc2"
14816       ;;
14817
14818     *)
14819       ld_shlibs=no
14820       can_build_shared=no
14821       ;;
14822     esac
14823   fi
14824   echo "$ac_t""${ld_shlibs}" 1>&6
14825   if test "$ld_shlibs" = "no"; then
14826     can_build_shared=no
14827   fi
14828 fi # End of if cc_produces_so = no
14829
14830
14831 if test "$xe_gnu_ld" = yes; then
14832   if test "$ld_shlibs" = yes; then
14833     ld_dynamic_link_flags="${wl}-export-dynamic"
14834   fi
14835 fi
14836
14837 if test -z "$ld_dynamic_link_flags"; then
14838   case "$xehost_os" in
14839   aix[3-9]*)
14840     ld_dynamic_link_flags=
14841     ;;
14842
14843   freebsd2.2*)
14844     ld_dynamic_link_flags=
14845     ;;
14846
14847   freebsd2*)
14848     ld_dynamic_link_flags=
14849     ;;
14850
14851   freebsd3*)
14852     ld_dynamic_link_flags=
14853     ;;
14854
14855   hpux*)
14856     ld_dynamic_link_flags="${wl}-E"
14857     ;;
14858
14859   irix[5-9]*)
14860     ld_dynamic_link_flags=
14861     ;;
14862
14863   netbsd*)
14864     ld_dynamic_link_flags=
14865     ;;
14866
14867   openbsd*)
14868     ld_dynamic_link_flags=
14869     ;;
14870
14871   osf3* | osf4*)
14872     ld_dynamic_link_flags=
14873     ;;
14874
14875   solaris2* | solaris7*)
14876     ld_dynamic_link_flags=
14877     ;;
14878
14879   sco3.2v5* | unixware* | sysv5* | sysv4*)
14880     ld_dynamic_link_flags="${wl}-Bexport"
14881     ;;
14882
14883   sunos4*)
14884     ld_dynamic_link_flags=
14885     ;;
14886
14887   uts4*)
14888     ld_dynamic_link_flags=
14889     ;;
14890
14891   bsdi*)
14892     ld_dynamic_link_flags=
14893     ;;
14894
14895   esac
14896 fi # End of if -z ld_dynamic_link_flags
14897 fi # End of if test "$can_build_shared" = "yes"
14898
14899
14900
14901
14902
14903
14904
14905
14906   fi
14907
14908   if test "$can_build_shared" = "yes"; then
14909     { test "$extra_verbose" = "yes" && cat << \EOF
14910     Defining HAVE_SHLIB
14911 EOF
14912 cat >> confdefs.h <<\EOF
14913 #define HAVE_SHLIB 1
14914 EOF
14915 }
14916
14917     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14918    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14919  fi
14920     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14921     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14922     for ac_func in dlerror _dlerror
14923 do
14924 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14925 echo "configure:14926: checking for $ac_func" >&5
14926
14927 cat > conftest.$ac_ext <<EOF
14928 #line 14929 "configure"
14929 #include "confdefs.h"
14930 /* System header to define __stub macros and hopefully few prototypes,
14931     which can conflict with char $ac_func(); below.  */
14932 #include <assert.h>
14933 /* Override any gcc2 internal prototype to avoid an error.  */
14934 /* We use char because int might match the return type of a gcc2
14935     builtin and then its argument prototype would still apply.  */
14936 char $ac_func();
14937
14938 int main() {
14939
14940 /* The GNU C library defines this for functions which it implements
14941     to always fail with ENOSYS.  Some functions are actually named
14942     something starting with __ and the normal name is an alias.  */
14943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14944 choke me
14945 #else
14946 $ac_func();
14947 #endif
14948
14949 ; return 0; }
14950 EOF
14951 if { (eval echo configure:14952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14952   rm -rf conftest*
14953   eval "ac_cv_func_$ac_func=yes"
14954 else
14955   echo "configure: failed program was:" >&5
14956   cat conftest.$ac_ext >&5
14957   rm -rf conftest*
14958   eval "ac_cv_func_$ac_func=no"
14959 fi
14960 rm -f conftest*
14961
14962 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14963   echo "$ac_t""yes" 1>&6
14964     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14965   { test "$extra_verbose" = "yes" && cat << EOF
14966     Defining $ac_tr_func
14967 EOF
14968 cat >> confdefs.h <<EOF
14969 #define $ac_tr_func 1
14970 EOF
14971 }
14972  
14973 else
14974   echo "$ac_t""no" 1>&6
14975 fi
14976 done
14977
14978     with_modules=yes
14979   else
14980     if test "$with_modules" = "yes"; then
14981       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14982     else
14983       echo "configure: warning: "Module support cannot be provided."" 1>&2
14984     fi
14985     with_modules=no
14986   fi
14987 fi
14988
14989 cat > conftest.$ac_ext <<EOF
14990 #line 14991 "configure"
14991 #include "confdefs.h"
14992 int main(int c,char *v[]){return 0;}
14993 EOF
14994 if { (eval echo configure:14995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14995 then
14996   :
14997 else
14998   conftest_rc="$?"
14999   echo "configure: failed program was:" >&5
15000   cat conftest.$ac_ext >&5
15001   rm -fr conftest*
15002   
15003   echo ""
15004   echo "*** PANIC *** The C compiler can no longer build working executables."
15005   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15006   echo "*** PANIC *** The most likely reason for this problem is that configure"
15007   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15008   echo "*** PANIC *** found at run time."
15009   echo "*** PANIC ***"
15010   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15011   echo "*** PANIC *** On other systems, try telling configure where to find the"
15012   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15013   echo "*** PANIC ***"
15014   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15015   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15016   echo "*** PANIC *** on your system.  Don't do that."
15017   exit 1
15018 fi
15019 rm -fr conftest*
15020
15021 if test "$win32_processes" = "yes"; then
15022   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15023    echo "    xemacs will be linked with \"process-nt.o\""
15024  fi
15025 else
15026   { test "$extra_verbose" = "yes" && cat << \EOF
15027     Defining HAVE_UNIX_PROCESSES
15028 EOF
15029 cat >> confdefs.h <<\EOF
15030 #define HAVE_UNIX_PROCESSES 1
15031 EOF
15032 }
15033
15034   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15035    echo "    xemacs will be linked with \"process-unix.o\""
15036  fi
15037 fi
15038
15039
15040
15041 T=""
15042 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15043 CFLAGS="$T"
15044
15045
15046 T=""
15047 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15048 extra_objs="$T"
15049
15050
15051 T=""
15052 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
15053 c_switch_general="$T"
15054
15055
15056 T=""
15057 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
15058 c_switch_window_system="$T"
15059
15060
15061 T=""
15062 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15063 c_switch_all="$T"
15064
15065
15066 T=""
15067 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
15068 ld_switch_general="$T"
15069
15070
15071 T=""
15072 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15073 ld_switch_window_system="$T"
15074
15075
15076 T=""
15077 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15078 ld_switch_all="$T"
15079
15080
15081 T=""
15082 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15083 ld_libs_general="$T"
15084
15085
15086 T=""
15087 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
15088 ld_libs_window_system="$T"
15089
15090
15091 T=""
15092 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15093 ld_libs_all="$T"
15094
15095
15096
15097 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15098 internal_makefile_list="Makefile.in"
15099 SUBDIR_MAKEFILES=''
15100 test -d lock || mkdir lock
15101 for dir in $MAKE_SUBDIR; do
15102   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15103         test -d "$d" || mkdir "$d"; cd "$d"
15104       done ) ;;
15105    * ) test -d "$dir" || mkdir "$dir" ;;
15106   esac
15107   
15108 T=""
15109 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15110 SUBDIR_MAKEFILES="$T"
15111
15112   
15113 T=""
15114 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15115 internal_makefile_list="$T"
15116
15117 done
15118
15119
15120
15121
15122 for dir in src/s src/m; do
15123   if test ! -d "$dir" ; then
15124     echo Making symbolic link to "$srcdir/$dir"
15125     ${LN_S} "$srcdir/$dir" "$dir"
15126   fi
15127 done
15128
15129 if test "$extra_verbose" = "yes"; then
15130   echo ""
15131   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
15132   echo ""
15133 fi
15134
15135
15136 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15137   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15138   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15139 fi
15140
15141 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15142   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15143   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15144 fi
15145
15146 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15147   test "$extra_verbose" = "yes" && echo "creating TAGS"
15148   echo "\f
15149 $srcdir/TAGS,include" > "TAGS"
15150 fi
15151
15152 if test "$__SUNPRO_C" = "yes"; then
15153   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15154   ( echo "# For use with Sun WorkShop's Source browser."
15155     echo "# See sbquery(1) and sbinit(4) for more information"
15156     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15157   ) > .sbinit
15158 fi
15159
15160 rm -f core
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181 PREFIX=$prefix
15182 while true; do
15183   case "$PREFIX" in
15184     *\$* ) eval "PREFIX=$PREFIX" ;;
15185     *) break ;;
15186   esac
15187 done
15188
15189
15190
15191
15192 EXEC_PREFIX=$exec_prefix
15193 while true; do
15194   case "$EXEC_PREFIX" in
15195     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15196     *) break ;;
15197   esac
15198 done
15199
15200
15201
15202
15203 INFODIR=$infodir
15204 while true; do
15205   case "$INFODIR" in
15206     *\$* ) eval "INFODIR=$INFODIR" ;;
15207     *) break ;;
15208   esac
15209 done
15210
15211
15212
15213
15214 INFOPATH=$infopath
15215 while true; do
15216   case "$INFOPATH" in
15217     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15218     *) break ;;
15219   esac
15220 done
15221
15222
15223
15224
15225 PACKAGE_PATH=$package_path
15226 while true; do
15227   case "$PACKAGE_PATH" in
15228     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15229     *) break ;;
15230   esac
15231 done
15232
15233
15234
15235
15236 LISPDIR=$lispdir
15237 while true; do
15238   case "$LISPDIR" in
15239     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15240     *) break ;;
15241   esac
15242 done
15243
15244
15245
15246
15247 MODULEDIR=$moduledir
15248 while true; do
15249   case "$MODULEDIR" in
15250     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15251     *) break ;;
15252   esac
15253 done
15254
15255
15256
15257
15258 SITELISPDIR=$sitelispdir
15259 while true; do
15260   case "$SITELISPDIR" in
15261     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15262     *) break ;;
15263   esac
15264 done
15265
15266
15267
15268
15269 SITEMODULEDIR=$sitemoduledir
15270 while true; do
15271   case "$SITEMODULEDIR" in
15272     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15273     *) break ;;
15274   esac
15275 done
15276
15277
15278
15279
15280 ETCDIR=$etcdir
15281 while true; do
15282   case "$ETCDIR" in
15283     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15284     *) break ;;
15285   esac
15286 done
15287
15288
15289
15290
15291 DOCDIR=$docdir
15292 while true; do
15293   case "$DOCDIR" in
15294     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15295     *) break ;;
15296   esac
15297 done
15298
15299
15300
15301
15302 ARCHLIBDIR=$archlibdir
15303 while true; do
15304   case "$ARCHLIBDIR" in
15305     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15306     *) break ;;
15307   esac
15308 done
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15330
15331
15332
15333
15334
15335
15336
15337 : ${XEMACS_CC:=$CC}
15338
15339
15340 if test "$with_prefix" = "yes"; then
15341   { test "$extra_verbose" = "yes" && cat << \EOF
15342     Defining PREFIX_USER_DEFINED
15343 EOF
15344 cat >> confdefs.h <<\EOF
15345 #define PREFIX_USER_DEFINED 1
15346 EOF
15347 }
15348
15349 fi
15350
15351 if test "$with_site_lisp" = "no"; then
15352   { test "$extra_verbose" = "yes" && cat << \EOF
15353     Defining INHIBIT_SITE_LISP
15354 EOF
15355 cat >> confdefs.h <<\EOF
15356 #define INHIBIT_SITE_LISP 1
15357 EOF
15358 }
15359
15360 fi
15361 if test "$with_site_modules" = "no"; then
15362   { test "$extra_verbose" = "yes" && cat << \EOF
15363     Defining INHIBIT_SITE_MODULES
15364 EOF
15365 cat >> confdefs.h <<\EOF
15366 #define INHIBIT_SITE_MODULES 1
15367 EOF
15368 }
15369
15370 fi
15371
15372
15373 T=""
15374 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15375 ac_configure_args="$T"
15376
15377 { test "$extra_verbose" = "yes" && cat << EOF
15378     Defining EMACS_CONFIGURATION = "$configuration"
15379 EOF
15380 cat >> confdefs.h <<EOF
15381 #define EMACS_CONFIGURATION "$configuration"
15382 EOF
15383 }
15384
15385 { test "$extra_verbose" = "yes" && cat << EOF
15386     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15387 EOF
15388 cat >> confdefs.h <<EOF
15389 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15390 EOF
15391 }
15392
15393
15394
15395 null_string=""
15396 { test "$extra_verbose" = "yes" && cat << EOF
15397     Defining LD_SWITCH_X_SITE = $null_string
15398 EOF
15399 cat >> confdefs.h <<EOF
15400 #define LD_SWITCH_X_SITE $null_string
15401 EOF
15402 }
15403
15404 { test "$extra_verbose" = "yes" && cat << EOF
15405     Defining LD_SWITCH_X_SITE_AUX = $null_string
15406 EOF
15407 cat >> confdefs.h <<EOF
15408 #define LD_SWITCH_X_SITE_AUX $null_string
15409 EOF
15410 }
15411
15412 { test "$extra_verbose" = "yes" && cat << EOF
15413     Defining C_SWITCH_X_SITE = $null_string
15414 EOF
15415 cat >> confdefs.h <<EOF
15416 #define C_SWITCH_X_SITE $null_string
15417 EOF
15418 }
15419
15420 { test "$extra_verbose" = "yes" && cat << EOF
15421     Defining LD_SWITCH_SITE = $null_string
15422 EOF
15423 cat >> confdefs.h <<EOF
15424 #define LD_SWITCH_SITE $null_string
15425 EOF
15426 }
15427
15428 { test "$extra_verbose" = "yes" && cat << EOF
15429     Defining C_SWITCH_SITE = $null_string
15430 EOF
15431 cat >> confdefs.h <<EOF
15432 #define C_SWITCH_SITE $null_string
15433 EOF
15434 }
15435
15436
15437
15438 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15439     Defining GNU_MALLOC
15440 EOF
15441 cat >> confdefs.h <<\EOF
15442 #define GNU_MALLOC 1
15443 EOF
15444 }
15445
15446 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15447     Defining USE_SYSTEM_MALLOC
15448 EOF
15449 cat >> confdefs.h <<\EOF
15450 #define USE_SYSTEM_MALLOC 1
15451 EOF
15452 }
15453
15454 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15455     Defining USE_DEBUG_MALLOC
15456 EOF
15457 cat >> confdefs.h <<\EOF
15458 #define USE_DEBUG_MALLOC 1
15459 EOF
15460 }
15461
15462                                               { test "$extra_verbose" = "yes" && cat << \EOF
15463     Defining USE_SYSTEM_MALLOC
15464 EOF
15465 cat >> confdefs.h <<\EOF
15466 #define USE_SYSTEM_MALLOC 1
15467 EOF
15468 }
15469
15470 fi
15471 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15472     Defining I18N3
15473 EOF
15474 cat >> confdefs.h <<\EOF
15475 #define I18N3 1
15476 EOF
15477 }
15478
15479 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15480     Defining USE_GCC
15481 EOF
15482 cat >> confdefs.h <<\EOF
15483 #define USE_GCC 1
15484 EOF
15485 }
15486
15487 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15488     Defining EXTERNAL_WIDGET
15489 EOF
15490 cat >> confdefs.h <<\EOF
15491 #define EXTERNAL_WIDGET 1
15492 EOF
15493 }
15494
15495 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15496     Defining QUICK_BUILD
15497 EOF
15498 cat >> confdefs.h <<\EOF
15499 #define QUICK_BUILD 1
15500 EOF
15501 }
15502
15503 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15504     Defining PURIFY
15505 EOF
15506 cat >> confdefs.h <<\EOF
15507 #define PURIFY 1
15508 EOF
15509 }
15510
15511 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15512     Defining QUANTIFY
15513 EOF
15514 cat >> confdefs.h <<\EOF
15515 #define QUANTIFY 1
15516 EOF
15517 }
15518
15519 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15520     Defining MAIL_USE_POP
15521 EOF
15522 cat >> confdefs.h <<\EOF
15523 #define MAIL_USE_POP 1
15524 EOF
15525 }
15526
15527 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15528     Defining KERBEROS
15529 EOF
15530 cat >> confdefs.h <<\EOF
15531 #define KERBEROS 1
15532 EOF
15533 }
15534
15535 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15536     Defining HESIOD
15537 EOF
15538 cat >> confdefs.h <<\EOF
15539 #define HESIOD 1
15540 EOF
15541 }
15542
15543 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15544     Defining USE_UNION_TYPE
15545 EOF
15546 cat >> confdefs.h <<\EOF
15547 #define USE_UNION_TYPE 1
15548 EOF
15549 }
15550
15551 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15552     Defining PDUMP
15553 EOF
15554 cat >> confdefs.h <<\EOF
15555 #define PDUMP 1
15556 EOF
15557 }
15558
15559
15560
15561 (
15562 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15563 else
15564   echo "uname -a: `uname -a`"
15565 fi
15566 echo ""
15567 echo "$0 $quoted_arguments"
15568 ) > Installation
15569
15570 if test ! -z ${emacs_beta_version} ; then
15571   if test -z "${emacs_is_beta}" ; then
15572         xemacs_betaname=".${emacs_beta_version}"
15573   else
15574         xemacs_betaname="-b${emacs_beta_version}"
15575   fi
15576 else
15577   xemacs_betaname=""
15578 fi
15579
15580 (
15581 echo "
15582
15583 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15584 "
15585 echo "
15586 Compilation / Installation:"
15587 echo "  Source code location:              $srcdir"
15588 echo "  Installation prefix:               $prefix"
15589 if test -n "$site_includes"; then
15590   echo "  Additional header files:           $site_includes"
15591 fi
15592 if test -n "$site_libraries"; then
15593   echo "  Additional libraries:              $site_libraries"
15594 fi
15595 if test -n "$site_prefixes"; then
15596   echo "  Additional prefixes:               $site_prefixes"
15597 fi
15598 if test -n "$runpath"; then
15599   echo "  Runtime library search path:       $runpath"
15600 fi
15601
15602 if test -n "$opsysfile"
15603 then echo "  Operating system description file: \`$opsysfile'"
15604 else echo "  Not using any operating system description file"
15605 fi
15606 if test -n "$machfile"
15607 then echo "  Machine description file:          \`$machfile'"
15608 else echo "  Not using any machine description file"
15609 fi
15610
15611 echo "  Compiler:                          $CC $CFLAGS"
15612 echo "  Relocating allocator for buffers:  $rel_alloc"
15613 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15614
15615 echo "
15616 Window System:"
15617 if test "$with_msw" = "yes"; then
15618   echo "  Compiling in support for the Microsoft window system."
15619 fi
15620 if test "$with_x11" = "yes"; then
15621   echo "  Compiling in support for the X window system:"
15622   echo "    - X Windows headers location:                 $x_includes"
15623   echo "    - X Windows libraries location:               $x_libraries"
15624   if test "$with_xauth" != yes; then
15625     echo "    - Xau (X authority) not available."
15626   fi
15627   if test "$with_xmu" != yes; then
15628     echo "    - Xmu library not available; substituting equivalent routines."
15629   fi
15630   if test "$with_wmcommand" != no; then
15631     echo "    - Handling WM_COMMAND properly."
15632   fi
15633 fi
15634 if test "$need_athena" = "yes"; then
15635   echo "  Compiling in support for the Athena widget set:"
15636   echo "    - Athena headers location:                    $athena_h_path"
15637   echo "    - Athena library to link:                     $athena_lib"
15638 fi
15639 case "$with_menubars" in
15640   gtk   ) echo "  Using GTK menubars."   ;;
15641   lucid ) echo "  Using Lucid menubars." ;;
15642   motif ) echo "  Using Motif menubars."
15643           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15644           echo "             We recommend using the Lucid menubar instead."
15645           echo "             Re-run configure with --with-menubars='lucid'." ;;
15646     msw ) echo "  Using MS-Windows menubars." ;;
15647 esac
15648 case "$with_scrollbars" in
15649   gtk    ) echo "  Using GTK scrollbars."        ;;
15650   lucid  ) echo "  Using Lucid scrollbars."      ;;
15651   motif  ) echo "  Using Motif scrollbars."      ;;
15652   athena ) echo "  Using Athena scrollbars."     ;;
15653      msw ) echo "  Using MS-Windows scrollbars." ;;
15654 esac
15655 case "$with_dialogs" in
15656   gtk    ) echo "  Using GTK dialog boxes." ;;
15657   motif  ) echo "  Using Motif dialog boxes."
15658            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15659              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15660              echo "             We recommend using the Athena dialog boxes instead."
15661              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15662              echo "             Read the PROBLEMS file for more information."
15663            fi; fi ;;
15664   athena ) echo "  Using Athena dialog boxes."     ;;
15665      msw ) echo "  Using MS-Windows dialog boxes." ;;
15666 esac
15667 case "$with_widgets" in
15668   gtk    ) echo "  Using GTK native widgets."        ;;
15669   motif  ) echo "  Using Motif native widgets."      ;;
15670   athena ) echo "  Using Athena native widgets."     ;;
15671      msw ) echo "  Using MS-Windows native widgets." ;;
15672 esac
15673 if test "$with_dragndrop" = yes; then
15674   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15675   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15676 fi
15677
15678 echo "
15679 TTY:"
15680 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15681 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15682
15683 echo "
15684 Images:"
15685 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15686 if test "$with_xpm" = yes; then
15687   echo "  Compiling in support for XPM  images."
15688 elif test "$with_x11" = yes; then
15689   echo "  WARNING: -----------------------------------------------------------"
15690   echo "  WARNING: Compiling without XPM image support."
15691   if test "$xpm_problem" != ""; then
15692     echo "  Reason: $xpm_problem"
15693   fi
15694   echo "  WARNING: You should strongly consider installing XPM."
15695   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15696   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15697   echo "  WARNING: -----------------------------------------------------------"
15698 fi
15699 if test "$with_png" = yes; then
15700   echo "  Compiling in support for PNG  images."
15701 elif test "$window_system" != "none"; then
15702   echo "  WARNING: -----------------------------------------------------------"
15703   echo "  WARNING: Compiling without PNG image support."
15704   if test "$png_problem" != ""; then
15705     echo "  Reason: $png_problem"
15706   fi
15707   echo "  WARNING: You should strongly consider installing the PNG libraries."
15708   echo "  WARNING: Otherwise certain images and glyphs may not display."
15709   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15710   echo "  WARNING: -----------------------------------------------------------"
15711 fi
15712 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15713 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15714 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15715
15716 echo "
15717 Sound:"
15718 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15719 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15720 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15721 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15722
15723 echo "
15724 Databases:"
15725 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15726 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15727 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15728 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15729 if test "$with_postgresql" = yes; then
15730   echo "  Compiling in support for PostgreSQL."
15731   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15732   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15733 fi
15734
15735 echo "
15736 Internationalization:"
15737 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15738 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15739 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15740 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15741 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15742 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15743 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15744 if test "$with_wnn" = yes; then
15745   echo "  Compiling in support for the WNN input method on Mule."
15746   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15747 fi
15748 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15749
15750 echo "
15751 Mail:"
15752 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15753 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15754 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15755 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15756
15757 echo "
15758 Other Features:"
15759 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15760 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15761 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15762 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15763 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15764 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15765 test "$pdump" = yes && echo "  Using the new portable dumper."
15766 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15767 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15768 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15769   != "no no no no no no"; then
15770   echo "  WARNING: ---------------------------------------------------------"
15771   echo "  WARNING: Compiling in support for runtime error checking."
15772   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15773   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15774   echo "  WARNING: ---------------------------------------------------------"
15775 fi
15776 echo ""
15777 ) | tee -a Installation
15778 echo ""
15779
15780
15781 # Remove any trailing slashes in these variables.
15782 test -n "$prefix" &&
15783   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15784 test -n "$exec_prefix" &&
15785   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15786
15787
15788 for file in $internal_makefile_list; do
15789   test "$file" = src/Makefile.in && \
15790     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15791   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15792 done
15793 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15794 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
15795
15796 trap '' 1 2 15
15797
15798 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15799
15800 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15801 # Let make expand exec_prefix.
15802 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15803
15804 # Any assignment to VPATH causes Sun make to only execute
15805 # the first set of double-colon rules, so remove it if not needed.
15806 # If there is a colon in the path, we need to keep it.
15807 if test "x$srcdir" = x.; then
15808   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15809 fi
15810
15811 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15812
15813 DEFS=-DHAVE_CONFIG_H
15814
15815 # Without the "./", some shells look in PATH for config.status.
15816 : ${CONFIG_STATUS=./config.status}
15817
15818 echo creating $CONFIG_STATUS
15819 rm -f $CONFIG_STATUS
15820 cat > $CONFIG_STATUS <<EOF
15821 #! /bin/sh
15822 # Generated automatically by configure.
15823 # Run this file to recreate the current configuration.
15824 # This directory was configured as follows,
15825 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15826 #
15827 # $0 $ac_configure_args
15828 #
15829 # Compiler output produced by configure, useful for debugging
15830 # configure, is in ./config.log if it exists.
15831
15832 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15833 for ac_option
15834 do
15835   case "\$ac_option" in
15836   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15837     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15838     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15839   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15840     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15841     exit 0 ;;
15842   -help | --help | --hel | --he | --h)
15843     echo "\$ac_cs_usage"; exit 0 ;;
15844   *) echo "\$ac_cs_usage"; exit 1 ;;
15845   esac
15846 done
15847
15848 ac_given_srcdir=$srcdir
15849 ac_given_INSTALL="$INSTALL"
15850
15851 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15852 EOF
15853 cat >> $CONFIG_STATUS <<EOF
15854
15855 # Protect against being on the right side of a sed subst in config.status.
15856 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15857  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15858 $ac_vpsub
15859 $extrasub
15860 s%@SHELL@%$SHELL%g
15861 s%@CFLAGS@%$CFLAGS%g
15862 s%@CPPFLAGS@%$CPPFLAGS%g
15863 s%@CXXFLAGS@%$CXXFLAGS%g
15864 s%@FFLAGS@%$FFLAGS%g
15865 s%@DEFS@%$DEFS%g
15866 s%@LDFLAGS@%$LDFLAGS%g
15867 s%@LIBS@%$LIBS%g
15868 s%@exec_prefix@%$exec_prefix%g
15869 s%@prefix@%$prefix%g
15870 s%@program_transform_name@%$program_transform_name%g
15871 s%@bindir@%$bindir%g
15872 s%@sbindir@%$sbindir%g
15873 s%@libexecdir@%$libexecdir%g
15874 s%@datadir@%$datadir%g
15875 s%@sysconfdir@%$sysconfdir%g
15876 s%@sharedstatedir@%$sharedstatedir%g
15877 s%@localstatedir@%$localstatedir%g
15878 s%@libdir@%$libdir%g
15879 s%@includedir@%$includedir%g
15880 s%@oldincludedir@%$oldincludedir%g
15881 s%@infodir@%$infodir%g
15882 s%@mandir@%$mandir%g
15883 s%@LN_S@%$LN_S%g
15884 s%@blddir@%$blddir%g
15885 s%@CC@%$CC%g
15886 s%@CPP@%$CPP%g
15887 s%@start_flags@%$start_flags%g
15888 s%@ld_switch_shared@%$ld_switch_shared%g
15889 s%@start_files@%$start_files%g
15890 s%@ld@%$ld%g
15891 s%@lib_gcc@%$lib_gcc%g
15892 s%@RANLIB@%$RANLIB%g
15893 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15894 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15895 s%@INSTALL_DATA@%$INSTALL_DATA%g
15896 s%@YACC@%$YACC%g
15897 s%@SET_MAKE@%$SET_MAKE%g
15898 s%@GTK_CONFIG@%$GTK_CONFIG%g
15899 s%@X_CFLAGS@%$X_CFLAGS%g
15900 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15901 s%@X_LIBS@%$X_LIBS%g
15902 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15903 s%@install_pp@%$install_pp%g
15904 s%@libs_xauth@%$libs_xauth%g
15905 s%@dnd_objs@%$dnd_objs%g
15906 s%@lwlib_objs@%$lwlib_objs%g
15907 s%@ALLOCA@%$ALLOCA%g
15908 s%@have_esd_config@%$have_esd_config%g
15909 s%@dll_ld@%$dll_ld%g
15910 s%@dll_cflags@%$dll_cflags%g
15911 s%@dll_ldflags@%$dll_ldflags%g
15912 s%@dll_post@%$dll_post%g
15913 s%@dll_ldo@%$dll_ldo%g
15914 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15915 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15916 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15917 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15918 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15919 s%@PROGNAME@%$PROGNAME%g
15920 s%@version@%$version%g
15921 s%@configuration@%$configuration%g
15922 s%@canonical@%$canonical%g
15923 s%@inststaticdir@%$inststaticdir%g
15924 s%@instvardir@%$instvardir%g
15925 s%@srcdir@%$srcdir%g
15926 s%@pkgdir@%$pkgdir%g
15927 s%@statedir@%$statedir%g
15928 s%@extra_includes@%$extra_includes%g
15929 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15930 s%@PREFIX@%$PREFIX%g
15931 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15932 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15933 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15934 s%@INFODIR@%$INFODIR%g
15935 s%@infopath@%$infopath%g
15936 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15937 s%@INFOPATH@%$INFOPATH%g
15938 s%@package_path@%$package_path%g
15939 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15940 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15941 s%@lispdir@%$lispdir%g
15942 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15943 s%@LISPDIR@%$LISPDIR%g
15944 s%@moduledir@%$moduledir%g
15945 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15946 s%@MODULEDIR@%$MODULEDIR%g
15947 s%@sitelispdir@%$sitelispdir%g
15948 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15949 s%@SITELISPDIR@%$SITELISPDIR%g
15950 s%@sitemoduledir@%$sitemoduledir%g
15951 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15952 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15953 s%@etcdir@%$etcdir%g
15954 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15955 s%@ETCDIR@%$ETCDIR%g
15956 s%@docdir@%$docdir%g
15957 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15958 s%@DOCDIR@%$DOCDIR%g
15959 s%@archlibdir@%$archlibdir%g
15960 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15961 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15962 s%@bitmapdir@%$bitmapdir%g
15963 s%@extra_objs@%$extra_objs%g
15964 s%@machfile@%$machfile%g
15965 s%@opsysfile@%$opsysfile%g
15966 s%@c_switch_general@%$c_switch_general%g
15967 s%@c_switch_window_system@%$c_switch_window_system%g
15968 s%@c_switch_all@%$c_switch_all%g
15969 s%@ld_switch_general@%$ld_switch_general%g
15970 s%@ld_switch_window_system@%$ld_switch_window_system%g
15971 s%@ld_switch_all@%$ld_switch_all%g
15972 s%@ld_libs_general@%$ld_libs_general%g
15973 s%@ld_libs_window_system@%$ld_libs_window_system%g
15974 s%@ld_libs_all@%$ld_libs_all%g
15975 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15976 s%@native_sound_lib@%$native_sound_lib%g
15977 s%@sound_cflags@%$sound_cflags%g
15978 s%@dynodump_arch@%$dynodump_arch%g
15979 s%@XEMACS_CC@%$XEMACS_CC%g
15980 s%@internal_makefile_list@%$internal_makefile_list%g
15981
15982 CEOF
15983 EOF
15984
15985 cat >> $CONFIG_STATUS <<\EOF
15986
15987 # Split the substitutions into bite-sized pieces for seds with
15988 # small command number limits, like on Digital OSF/1 and HP-UX.
15989 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15990 ac_file=1 # Number of current file.
15991 ac_beg=1 # First line for current file.
15992 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15993 ac_more_lines=:
15994 ac_sed_cmds=""
15995 while $ac_more_lines; do
15996   if test $ac_beg -gt 1; then
15997     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15998   else
15999     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16000   fi
16001   if test ! -s conftest.s$ac_file; then
16002     ac_more_lines=false
16003     rm -f conftest.s$ac_file
16004   else
16005     if test -z "$ac_sed_cmds"; then
16006       ac_sed_cmds="sed -f conftest.s$ac_file"
16007     else
16008       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16009     fi
16010     ac_file=`expr $ac_file + 1`
16011     ac_beg=$ac_end
16012     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16013   fi
16014 done
16015 if test -z "$ac_sed_cmds"; then
16016   ac_sed_cmds=cat
16017 fi
16018 EOF
16019
16020 cat >> $CONFIG_STATUS <<EOF
16021
16022 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16023 EOF
16024 cat >> $CONFIG_STATUS <<\EOF
16025 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16027   case "$ac_file" in
16028   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16029        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16030   *) ac_file_in="${ac_file}.in" ;;
16031   esac
16032
16033   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16034
16035   # Remove last slash and all that follows it.  Not all systems have dirname.
16036   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16037   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16038     # The file is in a subdirectory.
16039     test ! -d "$ac_dir" && mkdir "$ac_dir"
16040     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16041     # A "../" for each directory in $ac_dir_suffix.
16042     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16043   else
16044     ac_dir_suffix= ac_dots=
16045   fi
16046
16047   case "$ac_given_srcdir" in
16048   .)  srcdir=.
16049       if test -z "$ac_dots"; then top_srcdir=.
16050       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16051   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16052   *) # Relative path.
16053     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16054     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16055   esac
16056
16057   case "$ac_given_INSTALL" in
16058   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16059   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16060   esac
16061
16062   echo creating "$ac_file"
16063   rm -f "$ac_file"
16064   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16065   case "$ac_file" in
16066   *Makefile*) ac_comsub="1i\\
16067 # $configure_input" ;;
16068   *) ac_comsub= ;;
16069   esac
16070
16071   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16072   sed -e "$ac_comsub
16073 s%@configure_input@%$configure_input%g
16074 s%@srcdir@%$srcdir%g
16075 s%@top_srcdir@%$top_srcdir%g
16076 s%@INSTALL@%$INSTALL%g
16077 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16078 fi; done
16079 rm -f conftest.s*
16080
16081 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16082 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16083 #
16084 # ac_d sets the value in "#define NAME VALUE" lines.
16085 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16086 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16087 ac_dC='\3'
16088 ac_dD='%g'
16089 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16090 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16091 ac_uB='\([      ]\)%\1#\2define\3'
16092 ac_uC=' '
16093 ac_uD='\4%g'
16094 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16095 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16096 ac_eB='$%\1#\2define\3'
16097 ac_eC=' '
16098 ac_eD='%g'
16099
16100 if test "${CONFIG_HEADERS+set}" != set; then
16101 EOF
16102 cat >> $CONFIG_STATUS <<EOF
16103   CONFIG_HEADERS="src/config.h lwlib/config.h"
16104 EOF
16105 cat >> $CONFIG_STATUS <<\EOF
16106 fi
16107 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16108   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16109   case "$ac_file" in
16110   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16111        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16112   *) ac_file_in="${ac_file}.in" ;;
16113   esac
16114
16115   echo creating $ac_file
16116
16117   rm -f conftest.frag conftest.in conftest.out
16118   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16119   cat $ac_file_inputs > conftest.in
16120
16121 EOF
16122
16123 # Transform confdefs.h into a sed script conftest.vals that substitutes
16124 # the proper values into config.h.in to produce config.h.  And first:
16125 # Protect against being on the right side of a sed subst in config.status.
16126 # Protect against being in an unquoted here document in config.status.
16127 rm -f conftest.vals
16128 cat > conftest.hdr <<\EOF
16129 s/[\\&%]/\\&/g
16130 s%[\\$`]%\\&%g
16131 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16132 s%ac_d%ac_u%gp
16133 s%ac_u%ac_e%gp
16134 EOF
16135 sed -n -f conftest.hdr confdefs.h > conftest.vals
16136 rm -f conftest.hdr
16137
16138 # This sed command replaces #undef with comments.  This is necessary, for
16139 # example, in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 cat >> conftest.vals <<\EOF
16142 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16143 EOF
16144
16145 # Break up conftest.vals because some shells have a limit on
16146 # the size of here documents, and old seds have small limits too.
16147
16148 rm -f conftest.tail
16149 while :
16150 do
16151   ac_lines=`grep -c . conftest.vals`
16152   # grep -c gives empty output for an empty file on some AIX systems.
16153   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16154   # Write a limited-size here document to conftest.frag.
16155   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16156   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16157   echo 'CEOF
16158   sed -f conftest.frag conftest.in > conftest.out
16159   rm -f conftest.in
16160   mv conftest.out conftest.in
16161 ' >> $CONFIG_STATUS
16162   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16163   rm -f conftest.vals
16164   mv conftest.tail conftest.vals
16165 done
16166 rm -f conftest.vals
16167
16168 cat >> $CONFIG_STATUS <<\EOF
16169   rm -f conftest.frag conftest.h
16170   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16171   cat conftest.in >> conftest.h
16172   rm -f conftest.in
16173   if cmp -s $ac_file conftest.h 2>/dev/null; then
16174     echo "$ac_file is unchanged"
16175     rm -f conftest.h
16176   else
16177     # Remove last slash and all that follows it.  Not all systems have dirname.
16178       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16179       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16180       # The file is in a subdirectory.
16181       test ! -d "$ac_dir" && mkdir "$ac_dir"
16182     fi
16183     rm -f $ac_file
16184     mv conftest.h $ac_file
16185   fi
16186 fi; done
16187
16188 EOF
16189 cat >> $CONFIG_STATUS <<EOF
16190 CPP="$CPP"
16191  top_srcdir="$srcdir"
16192  MAKE_SUBDIR="$MAKE_SUBDIR"
16193
16194 EOF
16195 cat >> $CONFIG_STATUS <<\EOF
16196 for dir in . $MAKE_SUBDIR; do
16197   (
16198     cd $dir
16199     rm -f junk.c
16200     < Makefile.in \
16201       sed -e '/^# Generated/d' \
16202           -e 's%/\*\*/#.*%%' \
16203           -e 's/^ *# */#/' \
16204           -e '/^##/d' \
16205           -e '/^#/ {
16206 p
16207 d
16208 }'        \
16209           -e '/./ {
16210 s/\([\"]\)/\\\1/g
16211 s/^/"/
16212 s/$/"/
16213 }'  > junk.c;
16214
16215
16216
16217     echo creating $dir/Makefile
16218 $CPP -I. -I${top_srcdir}/src  junk.c \
16219   | sed -e 's/^\#.*//'          \
16220         -e 's/^[        ][      ]*$//'\
16221         -e 's/^ /       /'              \
16222         -e '/^[ \f]*$/d' \
16223         -e '/^\"/ {
16224         s/\\\([\"]\)/\1/g
16225         s/^[    ]*\"//
16226         s/\"[   ]*$//
16227 }' > Makefile.new
16228     chmod 444 Makefile.new
16229     mv -f Makefile.new Makefile
16230
16231     echo creating $dir/GNUmakefile
16232 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16233   | sed -e 's/^\#.*//'          \
16234         -e 's/^[        ][      ]*$//'\
16235         -e 's/^ /       /'              \
16236         -e '/^[ \f]*$/d' \
16237         -e '/^\"/ {
16238         s/\\\([\"]\)/\1/g
16239         s/^[    ]*\"//
16240         s/\"[   ]*$//
16241 }' > Makefile.new
16242     chmod 444 Makefile.new
16243     mv -f Makefile.new GNUmakefile
16244
16245     rm -f junk.c
16246   )
16247 done
16248
16249 sed < config.status >> lib-src/config.values \
16250   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16251   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16252   -e 's/^\([^ ]*\) $/\1 ""/' \
16253   -e 's/ 1$/ t/'
16254
16255
16256 exit 0
16257 EOF
16258 chmod +x $CONFIG_STATUS
16259 rm -fr confdefs* $ac_clean_files
16260 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1