* lisp/gnus-bbdb.el (gnus-bbdb/update-record): Save excursion while
[elisp/gnus.git-] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.14.1 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-emacs=EMACS      compile with EMACS [EMACS=emacs, mule...]"
16 ac_help="$ac_help
17   --with-xemacs=XEMACS    compile with XEMACS [XEMACS=xemacs]"
18 ac_help="$ac_help
19   --with-lispdir=DIR      Where to install lisp files
20                           (for XEmacs package, use --with-packagedir instead)"
21 ac_help="$ac_help
22   --with-etcdir=DIR       Where to install etc files"
23 ac_help="$ac_help
24   --with-w3=DIR           Specify where to find the w3 package"
25 ac_help="$ac_help
26   --with-packagedir=DIR   package DIR for XEmacs"
27 ac_help="$ac_help
28   --with-addpath=PATH     search Emacs-Lisp libraries with PATH
29                           use colons to separate directory names"
30
31 # Initialize some variables set by options.
32 # The variables have the same names as the options, with
33 # dashes changed to underlines.
34 build=NONE
35 cache_file=./config.cache
36 exec_prefix=NONE
37 host=NONE
38 no_create=
39 nonopt=NONE
40 no_recursion=
41 prefix=NONE
42 program_prefix=NONE
43 program_suffix=NONE
44 program_transform_name=s,x,x,
45 silent=
46 site=
47 srcdir=
48 target=NONE
49 verbose=
50 x_includes=NONE
51 x_libraries=NONE
52 bindir='${exec_prefix}/bin'
53 sbindir='${exec_prefix}/sbin'
54 libexecdir='${exec_prefix}/libexec'
55 datadir='${prefix}/share'
56 sysconfdir='${prefix}/etc'
57 sharedstatedir='${prefix}/com'
58 localstatedir='${prefix}/var'
59 libdir='${exec_prefix}/lib'
60 includedir='${prefix}/include'
61 oldincludedir='/usr/include'
62 infodir='${prefix}/info'
63 mandir='${prefix}/man'
64
65 # Initialize some other variables.
66 subdirs=
67 MFLAGS= MAKEFLAGS=
68 SHELL=${CONFIG_SHELL-/bin/sh}
69 # Maximum number of lines to put in a shell here document.
70 ac_max_here_lines=12
71
72 ac_prev=
73 for ac_option
74 do
75
76   # If the previous option needs an argument, assign it.
77   if test -n "$ac_prev"; then
78     eval "$ac_prev=\$ac_option"
79     ac_prev=
80     continue
81   fi
82
83   case "$ac_option" in
84   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
85   *) ac_optarg= ;;
86   esac
87
88   # Accept the important Cygnus configure options, so we can diagnose typos.
89
90   case "$ac_option" in
91
92   -bindir | --bindir | --bindi | --bind | --bin | --bi)
93     ac_prev=bindir ;;
94   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
95     bindir="$ac_optarg" ;;
96
97   -build | --build | --buil | --bui | --bu)
98     ac_prev=build ;;
99   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
100     build="$ac_optarg" ;;
101
102   -cache-file | --cache-file | --cache-fil | --cache-fi \
103   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
104     ac_prev=cache_file ;;
105   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
106   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
107     cache_file="$ac_optarg" ;;
108
109   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
110     ac_prev=datadir ;;
111   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
112   | --da=*)
113     datadir="$ac_optarg" ;;
114
115   -disable-* | --disable-*)
116     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
117     # Reject names that are not valid shell variable names.
118     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
119       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120     fi
121     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122     eval "enable_${ac_feature}=no" ;;
123
124   -enable-* | --enable-*)
125     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
126     # Reject names that are not valid shell variable names.
127     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
128       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129     fi
130     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131     case "$ac_option" in
132       *=*) ;;
133       *) ac_optarg=yes ;;
134     esac
135     eval "enable_${ac_feature}='$ac_optarg'" ;;
136
137   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
138   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
139   | --exec | --exe | --ex)
140     ac_prev=exec_prefix ;;
141   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
142   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
143   | --exec=* | --exe=* | --ex=*)
144     exec_prefix="$ac_optarg" ;;
145
146   -gas | --gas | --ga | --g)
147     # Obsolete; use --with-gas.
148     with_gas=yes ;;
149
150   -help | --help | --hel | --he)
151     # Omit some internal or obsolete options to make the list less imposing.
152     # This message is too long to be a string in the A/UX 3.1 sh.
153     cat << EOF
154 Usage: configure [options] [host]
155 Options: [defaults in brackets after descriptions]
156 Configuration:
157   --cache-file=FILE       cache test results in FILE
158   --help                  print this message
159   --no-create             do not create output files
160   --quiet, --silent       do not print \`checking...' messages
161   --version               print the version of autoconf that created configure
162 Directory and file names:
163   --prefix=PREFIX         install architecture-independent files in PREFIX
164                           [$ac_default_prefix]
165   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
166                           [same as prefix]
167   --bindir=DIR            user executables in DIR [EPREFIX/bin]
168   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
169   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
170   --datadir=DIR           read-only architecture-independent data in DIR
171                           [PREFIX/share]
172   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
173   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
174                           [PREFIX/com]
175   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
176   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
177   --includedir=DIR        C header files in DIR [PREFIX/include]
178   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
179   --infodir=DIR           info documentation in DIR [PREFIX/info]
180   --mandir=DIR            man documentation in DIR [PREFIX/man]
181   --srcdir=DIR            find the sources in DIR [configure dir or ..]
182   --program-prefix=PREFIX prepend PREFIX to installed program names
183   --program-suffix=SUFFIX append SUFFIX to installed program names
184   --program-transform-name=PROGRAM
185                           run sed PROGRAM on installed program names
186 EOF
187     cat << EOF
188 Host type:
189   --build=BUILD           configure for building on BUILD [BUILD=HOST]
190   --host=HOST             configure for HOST [guessed]
191   --target=TARGET         configure for TARGET [TARGET=HOST]
192 Features and packages:
193   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
194   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
195   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
196   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
197   --x-includes=DIR        X include files are in DIR
198   --x-libraries=DIR       X library files are in DIR
199 EOF
200     if test -n "$ac_help"; then
201       echo "--enable and --with options recognized:$ac_help"
202     fi
203     exit 0 ;;
204
205   -host | --host | --hos | --ho)
206     ac_prev=host ;;
207   -host=* | --host=* | --hos=* | --ho=*)
208     host="$ac_optarg" ;;
209
210   -includedir | --includedir | --includedi | --included | --include \
211   | --includ | --inclu | --incl | --inc)
212     ac_prev=includedir ;;
213   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
214   | --includ=* | --inclu=* | --incl=* | --inc=*)
215     includedir="$ac_optarg" ;;
216
217   -infodir | --infodir | --infodi | --infod | --info | --inf)
218     ac_prev=infodir ;;
219   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
220     infodir="$ac_optarg" ;;
221
222   -libdir | --libdir | --libdi | --libd)
223     ac_prev=libdir ;;
224   -libdir=* | --libdir=* | --libdi=* | --libd=*)
225     libdir="$ac_optarg" ;;
226
227   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
228   | --libexe | --libex | --libe)
229     ac_prev=libexecdir ;;
230   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
231   | --libexe=* | --libex=* | --libe=*)
232     libexecdir="$ac_optarg" ;;
233
234   -localstatedir | --localstatedir | --localstatedi | --localstated \
235   | --localstate | --localstat | --localsta | --localst \
236   | --locals | --local | --loca | --loc | --lo)
237     ac_prev=localstatedir ;;
238   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
239   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
240   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
241     localstatedir="$ac_optarg" ;;
242
243   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244     ac_prev=mandir ;;
245   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
246     mandir="$ac_optarg" ;;
247
248   -nfp | --nfp | --nf)
249     # Obsolete; use --without-fp.
250     with_fp=no ;;
251
252   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
253   | --no-cr | --no-c)
254     no_create=yes ;;
255
256   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
257   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
258     no_recursion=yes ;;
259
260   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
261   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
262   | --oldin | --oldi | --old | --ol | --o)
263     ac_prev=oldincludedir ;;
264   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
265   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
266   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
267     oldincludedir="$ac_optarg" ;;
268
269   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270     ac_prev=prefix ;;
271   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
272     prefix="$ac_optarg" ;;
273
274   -program-prefix | --program-prefix | --program-prefi | --program-pref \
275   | --program-pre | --program-pr | --program-p)
276     ac_prev=program_prefix ;;
277   -program-prefix=* | --program-prefix=* | --program-prefi=* \
278   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
279     program_prefix="$ac_optarg" ;;
280
281   -program-suffix | --program-suffix | --program-suffi | --program-suff \
282   | --program-suf | --program-su | --program-s)
283     ac_prev=program_suffix ;;
284   -program-suffix=* | --program-suffix=* | --program-suffi=* \
285   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
286     program_suffix="$ac_optarg" ;;
287
288   -program-transform-name | --program-transform-name \
289   | --program-transform-nam | --program-transform-na \
290   | --program-transform-n | --program-transform- \
291   | --program-transform | --program-transfor \
292   | --program-transfo | --program-transf \
293   | --program-trans | --program-tran \
294   | --progr-tra | --program-tr | --program-t)
295     ac_prev=program_transform_name ;;
296   -program-transform-name=* | --program-transform-name=* \
297   | --program-transform-nam=* | --program-transform-na=* \
298   | --program-transform-n=* | --program-transform-=* \
299   | --program-transform=* | --program-transfor=* \
300   | --program-transfo=* | --program-transf=* \
301   | --program-trans=* | --program-tran=* \
302   | --progr-tra=* | --program-tr=* | --program-t=*)
303     program_transform_name="$ac_optarg" ;;
304
305   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
306   | -silent | --silent | --silen | --sile | --sil)
307     silent=yes ;;
308
309   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310     ac_prev=sbindir ;;
311   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312   | --sbi=* | --sb=*)
313     sbindir="$ac_optarg" ;;
314
315   -sharedstatedir | --sharedstatedir | --sharedstatedi \
316   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
317   | --sharedst | --shareds | --shared | --share | --shar \
318   | --sha | --sh)
319     ac_prev=sharedstatedir ;;
320   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
321   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
322   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323   | --sha=* | --sh=*)
324     sharedstatedir="$ac_optarg" ;;
325
326   -site | --site | --sit)
327     ac_prev=site ;;
328   -site=* | --site=* | --sit=*)
329     site="$ac_optarg" ;;
330
331   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332     ac_prev=srcdir ;;
333   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
334     srcdir="$ac_optarg" ;;
335
336   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
337   | --syscon | --sysco | --sysc | --sys | --sy)
338     ac_prev=sysconfdir ;;
339   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
340   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
341     sysconfdir="$ac_optarg" ;;
342
343   -target | --target | --targe | --targ | --tar | --ta | --t)
344     ac_prev=target ;;
345   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
346     target="$ac_optarg" ;;
347
348   -v | -verbose | --verbose | --verbos | --verbo | --verb)
349     verbose=yes ;;
350
351   -version | --version | --versio | --versi | --vers)
352     echo "configure generated by autoconf version 2.14.1"
353     exit 0 ;;
354
355   -with-* | --with-*)
356     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
357     # Reject names that are not valid shell variable names.
358     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
359       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360     fi
361     ac_package=`echo $ac_package| sed 's/-/_/g'`
362     case "$ac_option" in
363       *=*) ;;
364       *) ac_optarg=yes ;;
365     esac
366     eval "with_${ac_package}='$ac_optarg'" ;;
367
368   -without-* | --without-*)
369     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
370     # Reject names that are not valid shell variable names.
371     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
372       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373     fi
374     ac_package=`echo $ac_package| sed 's/-/_/g'`
375     eval "with_${ac_package}=no" ;;
376
377   --x)
378     # Obsolete; use --with-x.
379     with_x=yes ;;
380
381   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
382   | --x-incl | --x-inc | --x-in | --x-i)
383     ac_prev=x_includes ;;
384   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
385   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
386     x_includes="$ac_optarg" ;;
387
388   -x-libraries | --x-libraries | --x-librarie | --x-librari \
389   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
390     ac_prev=x_libraries ;;
391   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
392   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
393     x_libraries="$ac_optarg" ;;
394
395   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
396     ;;
397
398   *)
399     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
400       echo "configure: warning: $ac_option: invalid host type" 1>&2
401     fi
402     if test "x$nonopt" != xNONE; then
403       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
404     fi
405     nonopt="$ac_option"
406     ;;
407
408   esac
409 done
410
411 if test -n "$ac_prev"; then
412   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
413 fi
414
415 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416
417 # File descriptor usage:
418 # 0 standard input
419 # 1 file creation
420 # 2 errors and warnings
421 # 3 some systems may open it to /dev/tty
422 # 4 used on the Kubota Titan
423 # 6 checking for... messages and results
424 # 5 compiler messages saved in config.log
425 if test "$silent" = yes; then
426   exec 6>/dev/null
427 else
428   exec 6>&1
429 fi
430 exec 5>./config.log
431
432 echo "\
433 This file contains any messages produced by compilers while
434 running configure, to aid debugging if configure makes a mistake.
435 " 1>&5
436
437 # Strip out --no-create and --no-recursion so they do not pile up.
438 # Also quote any args containing shell metacharacters.
439 ac_configure_args=
440 for ac_arg
441 do
442   case "$ac_arg" in
443   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
444   | --no-cr | --no-c) ;;
445   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
446   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
447   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
448   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
449   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450   esac
451 done
452
453 # NLS nuisances.
454 # Only set these to C if already set.  These must not be set unconditionally
455 # because not all systems understand e.g. LANG=C (notably SCO).
456 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
457 # Non-C LC_CTYPE values break the ctype check.
458 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
459 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
460 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
461 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
462
463 # confdefs.h avoids OS command line length limits that DEFS can exceed.
464 rm -rf conftest* confdefs.h
465 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
466 echo > confdefs.h
467
468 # A filename unique to this package, relative to the directory that
469 # configure is in, which we can look for to find out if srcdir is correct.
470 ac_unique_file=lisp/gnus.el
471
472 # Find the source files, if location was not specified.
473 if test -z "$srcdir"; then
474   ac_srcdir_defaulted=yes
475   # Try the directory containing this script, then its parent.
476   ac_prog=$0
477   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
478   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479   srcdir=$ac_confdir
480   if test ! -r $srcdir/$ac_unique_file; then
481     srcdir=..
482   fi
483 else
484   ac_srcdir_defaulted=no
485 fi
486 if test ! -r $srcdir/$ac_unique_file; then
487   if test "$ac_srcdir_defaulted" = yes; then
488     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489   else
490     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
491   fi
492 fi
493 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494
495 # Prefer explicitly selected file to automatically selected ones.
496 if test -z "$CONFIG_SITE"; then
497   if test "x$prefix" != xNONE; then
498     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499   else
500     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
501   fi
502 fi
503 for ac_site_file in $CONFIG_SITE; do
504   if test -r "$ac_site_file"; then
505     echo "loading site script $ac_site_file"
506     . "$ac_site_file"
507   fi
508 done
509
510 if test -r "$cache_file"; then
511   echo "loading cache $cache_file"
512       test -f "$cache_file" && . $cache_file
513 else
514   echo "creating cache $cache_file"
515   > $cache_file
516 fi
517
518 ac_ext=c
519 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
520 ac_cpp='$CPP $CPPFLAGS'
521 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
522 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
523 cross_compiling=$ac_cv_prog_cc_cross
524
525 ac_exeext=
526 ac_objext=o
527 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
528   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
529   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530     ac_n= ac_c='
531 ' ac_t='        '
532   else
533     ac_n=-n ac_c= ac_t=
534   fi
535 else
536   ac_n= ac_c='\c' ac_t=
537 fi
538
539
540 echo $ac_n "defining gnus product name... $ac_c"
541   if eval "test \"\${EMACS_cv_GNUS_PRODUCT_NAME+set}\" = set"; then
542   echo $ac_n "(cached) $ac_c" 1>&6
543 else
544   EMACS_cv_GNUS_PRODUCT_NAME=t-gnus
545 fi
546
547   GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME}
548   echo "$ac_t""${GNUS_PRODUCT_NAME}" 1>&6
549   
550 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
551 echo "configure:552: checking whether ${MAKE-make} sets \${MAKE}" >&5
552 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
553 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
554   echo $ac_n "(cached) $ac_c" 1>&6
555 else
556   cat > conftestmake <<\EOF
557 all:
558         @echo 'ac_maketemp="${MAKE}"'
559 EOF
560 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
561 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
562 if test -n "$ac_maketemp"; then
563   eval ac_cv_prog_make_${ac_make}_set=yes
564 else
565   eval ac_cv_prog_make_${ac_make}_set=no
566 fi
567 rm -f conftestmake
568 fi
569 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
570   echo "$ac_t""yes" 1>&6
571   SET_MAKE=
572 else
573   echo "$ac_t""no" 1>&6
574   SET_MAKE="MAKE=${MAKE-make}"
575 fi
576
577 ac_aux_dir=
578 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
579   if test -f $ac_dir/install-sh; then
580     ac_aux_dir=$ac_dir
581     ac_install_sh="$ac_aux_dir/install-sh -c"
582     break
583   elif test -f $ac_dir/install.sh; then
584     ac_aux_dir=$ac_dir
585     ac_install_sh="$ac_aux_dir/install.sh -c"
586     break
587   fi
588 done
589 if test -z "$ac_aux_dir"; then
590   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
591 fi
592 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
593 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
594 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
595
596 # Find a good install program.  We prefer a C program (faster),
597 # so one script is as good as another.  But avoid the broken or
598 # incompatible versions:
599 # SysV /etc/install, /usr/sbin/install
600 # SunOS /usr/etc/install
601 # IRIX /sbin/install
602 # AIX /bin/install
603 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
604 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
605 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
606 # ./install, which can be erroneously created by make from ./install.sh.
607 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
608 echo "configure:609: checking for a BSD compatible install" >&5
609 if test -z "$INSTALL"; then
610 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
611   echo $ac_n "(cached) $ac_c" 1>&6
612 else
613     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
614   for ac_dir in $PATH; do
615     # Account for people who put trailing slashes in PATH elements.
616     case "$ac_dir/" in
617     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
618     *)
619       # OSF1 and SCO ODT 3.0 have their own names for install.
620       # Don't use installbsd from OSF since it installs stuff as root
621       # by default.
622       for ac_prog in ginstall scoinst install; do
623         if test -f $ac_dir/$ac_prog; then
624           if test $ac_prog = install &&
625             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
626             # AIX install.  It has an incompatible calling convention.
627             :
628           elif test $ac_prog = install &&
629             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
630             # program-specific install script used by HP pwplus--don't use.
631             :
632           else
633             ac_cv_path_install="$ac_dir/$ac_prog -c"
634             break 2
635           fi
636         fi
637       done
638       ;;
639     esac
640   done
641   IFS="$ac_save_IFS"
642
643 fi
644   if test "${ac_cv_path_install+set}" = set; then
645     INSTALL="$ac_cv_path_install"
646   else
647     # As a last resort, use the slow shell script.  We don't cache a
648     # path for INSTALL within a source directory, because that will
649     # break other packages using the cache if that directory is
650     # removed, or if the path is relative.
651     INSTALL="$ac_install_sh"
652   fi
653 fi
654 echo "$ac_t""$INSTALL" 1>&6
655
656 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
657 # It thinks the first close brace ends the variable substitution.
658 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
659
660 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
661
662 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
663
664 # Extract the first word of "makeinfo", so it can be a program name with args.
665 set dummy makeinfo; ac_word=$2
666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
667 echo "configure:668: checking for $ac_word" >&5
668 if eval "test \"\${ac_cv_prog_MAKEINFO+set}\" = set"; then
669   echo $ac_n "(cached) $ac_c" 1>&6
670 else
671   if test -n "$MAKEINFO"; then
672   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
673 else
674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
675   ac_dummy="$PATH"
676   for ac_dir in $ac_dummy; do
677     test -z "$ac_dir" && ac_dir=.
678     if test -f $ac_dir/$ac_word; then
679       ac_cv_prog_MAKEINFO="makeinfo"
680       break
681     fi
682   done
683   IFS="$ac_save_ifs"
684   test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO="no"
685 fi
686 fi
687 MAKEINFO="$ac_cv_prog_MAKEINFO"
688 if test -n "$MAKEINFO"; then
689   echo "$ac_t""$MAKEINFO" 1>&6
690 else
691   echo "$ac_t""no" 1>&6
692 fi
693
694
695       test x$EMACS = xt && EMACS=
696
697     unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS;
698
699   # Check whether --with-emacs or --without-emacs was given.
700 if test "${with_emacs+set}" = set; then
701   withval="$with_emacs"
702   if test x$withval = xyes -o x$withval = x; then
703       for ac_prog in emacs xemacs mule
704 do
705 # Extract the first word of "$ac_prog", so it can be a program name with args.
706 set dummy $ac_prog; ac_word=$2
707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
708 echo "configure:709: checking for $ac_word" >&5
709 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
710   echo $ac_n "(cached) $ac_c" 1>&6
711 else
712   if test -n "$EMACS"; then
713   ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
714 else
715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
716   ac_dummy="$PATH"
717   for ac_dir in $ac_dummy; do
718     test -z "$ac_dir" && ac_dir=.
719     if test -f $ac_dir/$ac_word; then
720       ac_cv_prog_EMACS="$ac_prog"
721       break
722     fi
723   done
724   IFS="$ac_save_ifs"
725 fi
726 fi
727 EMACS="$ac_cv_prog_EMACS"
728 if test -n "$EMACS"; then
729   echo "$ac_t""$EMACS" 1>&6
730 else
731   echo "$ac_t""no" 1>&6
732 fi
733
734 test -n "$EMACS" && break
735 done
736 test -n "$EMACS" || EMACS="emacs"
737
738     else
739       # Extract the first word of "$withval", so it can be a program name with args.
740 set dummy $withval; ac_word=$2
741 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
742 echo "configure:743: checking for $ac_word" >&5
743 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746   if test -n "$EMACS"; then
747   ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
748 else
749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
750   ac_dummy="$PATH"
751   for ac_dir in $ac_dummy; do
752     test -z "$ac_dir" && ac_dir=.
753     if test -f $ac_dir/$ac_word; then
754       ac_cv_prog_EMACS="$withval"
755       break
756     fi
757   done
758   IFS="$ac_save_ifs"
759   test -z "$ac_cv_prog_EMACS" && ac_cv_prog_EMACS="emacs"
760 fi
761 fi
762 EMACS="$ac_cv_prog_EMACS"
763 if test -n "$EMACS"; then
764   echo "$ac_t""$EMACS" 1>&6
765 else
766   echo "$ac_t""no" 1>&6
767 fi
768
769     fi
770 fi
771
772   # Check whether --with-xemacs or --without-xemacs was given.
773 if test "${with_xemacs+set}" = set; then
774   withval="$with_xemacs"
775   if test x$withval = xyes -o x$withval = x; then
776       # Extract the first word of "xemacs", so it can be a program name with args.
777 set dummy xemacs; ac_word=$2
778 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
779 echo "configure:780: checking for $ac_word" >&5
780 if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then
781   echo $ac_n "(cached) $ac_c" 1>&6
782 else
783   if test -n "$XEMACS"; then
784   ac_cv_prog_XEMACS="$XEMACS" # Let the user override the test.
785 else
786   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
787   ac_dummy="$PATH"
788   for ac_dir in $ac_dummy; do
789     test -z "$ac_dir" && ac_dir=.
790     if test -f $ac_dir/$ac_word; then
791       ac_cv_prog_XEMACS="xemacs"
792       break
793     fi
794   done
795   IFS="$ac_save_ifs"
796   test -z "$ac_cv_prog_XEMACS" && ac_cv_prog_XEMACS="xemacs"
797 fi
798 fi
799 XEMACS="$ac_cv_prog_XEMACS"
800 if test -n "$XEMACS"; then
801   echo "$ac_t""$XEMACS" 1>&6
802 else
803   echo "$ac_t""no" 1>&6
804 fi
805
806     else
807       # Extract the first word of "$withval", so it can be a program name with args.
808 set dummy $withval; ac_word=$2
809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
810 echo "configure:811: checking for $ac_word" >&5
811 if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then
812   echo $ac_n "(cached) $ac_c" 1>&6
813 else
814   if test -n "$XEMACS"; then
815   ac_cv_prog_XEMACS="$XEMACS" # Let the user override the test.
816 else
817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
818   ac_dummy="$PATH"
819   for ac_dir in $ac_dummy; do
820     test -z "$ac_dir" && ac_dir=.
821     if test -f $ac_dir/$ac_word; then
822       ac_cv_prog_XEMACS="$withval"
823       break
824     fi
825   done
826   IFS="$ac_save_ifs"
827   test -z "$ac_cv_prog_XEMACS" && ac_cv_prog_XEMACS="xemacs"
828 fi
829 fi
830 XEMACS="$ac_cv_prog_XEMACS"
831 if test -n "$XEMACS"; then
832   echo "$ac_t""$XEMACS" 1>&6
833 else
834   echo "$ac_t""no" 1>&6
835 fi
836
837     fi
838     EMACS=$XEMACS
839 else
840   XEMACS=xemacs
841     test x$EMACS = x &&\
842       for ac_prog in emacs xemacs mule
843 do
844 # Extract the first word of "$ac_prog", so it can be a program name with args.
845 set dummy $ac_prog; ac_word=$2
846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
847 echo "configure:848: checking for $ac_word" >&5
848 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
849   echo $ac_n "(cached) $ac_c" 1>&6
850 else
851   if test -n "$EMACS"; then
852   ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
853 else
854   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
855   ac_dummy="$PATH"
856   for ac_dir in $ac_dummy; do
857     test -z "$ac_dir" && ac_dir=.
858     if test -f $ac_dir/$ac_word; then
859       ac_cv_prog_EMACS="$ac_prog"
860       break
861     fi
862   done
863   IFS="$ac_save_ifs"
864 fi
865 fi
866 EMACS="$ac_cv_prog_EMACS"
867 if test -n "$EMACS"; then
868   echo "$ac_t""$EMACS" 1>&6
869 else
870   echo "$ac_t""no" 1>&6
871 fi
872
873 test -n "$EMACS" && break
874 done
875 test -n "$EMACS" || EMACS="emacs"
876
877 fi
878
879   
880   
881
882   echo $ac_n "checking what a flavor does $EMACS have""... $ac_c" 1>&6
883 echo "configure:884: checking what a flavor does $EMACS have" >&5
884
885     unset EMACS_cv_SYS_flavor;
886
887   
888 elisp="(cond ((featurep (quote xemacs)) \"XEmacs\")\
889           ((boundp (quote MULE)) \"MULE\")\
890           (t \"FSF Emacs\"))"
891 if test -z ""noecho""; then
892         echo $ac_n "checking for flavor""... $ac_c" 1>&6
893 echo "configure:894: checking for flavor" >&5
894 fi
895 if eval "test \"\${EMACS_cv_SYS_flavor+set}\" = set"; then
896   echo $ac_n "(cached) $ac_c" 1>&6
897 else
898   
899         OUTPUT=./conftest-$$
900         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
901         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
902         retval=`cat ${OUTPUT}`
903         echo "=> ${retval}" >& 5 2>&1
904         rm -f ${OUTPUT}
905         EMACS_cv_SYS_flavor=$retval
906
907 fi
908
909 flavor=${EMACS_cv_SYS_flavor}
910 if test -z ""noecho""; then
911         echo "$ac_t""$flavor" 1>&6
912 fi
913
914   case $EMACS_cv_SYS_flavor in
915   XEmacs)
916     EMACS_FLAVOR=xemacs;;
917   MULE)
918     EMACS_FLAVOR=mule;;
919   *)
920     EMACS_FLAVOR=emacs;;
921   esac
922   echo "$ac_t""$EMACS_cv_SYS_flavor" 1>&6
923   if test "$prefix" = "NONE"; then
924         echo $ac_n "checking prefix for your Emacs""... $ac_c" 1>&6
925 echo "configure:926: checking prefix for your Emacs" >&5
926         
927 elisp="(expand-file-name \"..\" invocation-directory)"
928 if test -z ""noecho""; then
929         echo $ac_n "checking for prefix""... $ac_c" 1>&6
930 echo "configure:931: checking for prefix" >&5
931 fi
932 if eval "test \"\${EMACS_cv_SYS_prefix+set}\" = set"; then
933   echo $ac_n "(cached) $ac_c" 1>&6
934 else
935   
936         OUTPUT=./conftest-$$
937         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
938         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
939         retval=`cat ${OUTPUT}`
940         echo "=> ${retval}" >& 5 2>&1
941         rm -f ${OUTPUT}
942         EMACS_cv_SYS_prefix=$retval
943
944 fi
945
946 prefix=${EMACS_cv_SYS_prefix}
947 if test -z ""noecho""; then
948         echo "$ac_t""$prefix" 1>&6
949 fi
950
951         prefix=${EMACS_cv_SYS_prefix}
952         echo "$ac_t""$prefix" 1>&6
953   fi
954   # Check whether --with-lispdir or --without-lispdir was given.
955 if test "${with_lispdir+set}" = set; then
956   withval="$with_lispdir"
957   lispdir=${withval}
958 fi
959
960   echo $ac_n "checking where lisp files should go""... $ac_c" 1>&6
961 echo "configure:962: checking where lisp files should go" >&5
962   if test -z "$lispdir"; then
963         theprefix=$prefix
964     if test "x$theprefix" = "xNONE"; then
965         theprefix=$ac_default_prefix
966     fi
967     lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
968     for thedir in share lib; do
969         potential=
970         if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then
971            lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
972            break
973         fi
974     done
975   fi
976   if test ${EMACS_FLAVOR} = xemacs; then
977     echo "$ac_t""$lispdir
978          (it will be ignored when \"make install-package[-ja]\" is done)" 1>&6
979   else
980     echo "$ac_t""$lispdir" 1>&6
981   fi
982   
983
984
985   # Check whether --with-etcdir or --without-etcdir was given.
986 if test "${with_etcdir+set}" = set; then
987   withval="$with_etcdir"
988   etcdir=${withval}
989 fi
990
991   echo $ac_n "checking where etc files should go""... $ac_c" 1>&6
992 echo "configure:993: checking where etc files should go" >&5
993   if test -z "$etcdir"; then
994         etcdir="\$(lispdir)/../etc"
995   fi
996   echo "$ac_t""$etcdir" 1>&6
997   
998
999
1000 echo $ac_n "checking for acceptable W3 version""... $ac_c" 1>&6
1001 echo "configure:1002: checking for acceptable W3 version" >&5
1002
1003 unset EMACS_cv_ACCEPTABLE_W3;
1004 unset EMACS_cv_SYS_w3_dir;
1005 unset EMACS_cv_SYS_w3_forms;
1006
1007 if eval "test \"\${EMACS_cv_ACCEPTABLE_W3+set}\" = set"; then
1008   echo $ac_n "(cached) $ac_c" 1>&6
1009 else
1010   
1011
1012 if test -z ""noecho""; then
1013         echo $ac_n "checking for w3-form-encode-xwfu in w3_forms""... $ac_c" 1>&6
1014 echo "configure:1015: checking for w3-form-encode-xwfu in w3_forms" >&5
1015 fi
1016 library=`echo w3_forms | tr _ -`
1017
1018 elisp="(progn (fmakunbound (quote w3-form-encode-xwfu)) (condition-case nil (progn (require (quote $library)) (fboundp (quote w3-form-encode-xwfu))) (error (prog1 nil (message \"$library not found\")))))"
1019 if test -z ""noecho""; then
1020         echo $ac_n "checking for w3_forms""... $ac_c" 1>&6
1021 echo "configure:1022: checking for w3_forms" >&5
1022 fi
1023 if eval "test \"\${EMACS_cv_SYS_w3_forms+set}\" = set"; then
1024   echo $ac_n "(cached) $ac_c" 1>&6
1025 else
1026   
1027         OUTPUT=./conftest-$$
1028         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1029         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1030         retval=`cat ${OUTPUT}`
1031         echo "=> ${retval}" >& 5 2>&1
1032         rm -f ${OUTPUT}
1033         EMACS_cv_SYS_w3_forms=$retval
1034
1035 fi
1036
1037 w3_forms=${EMACS_cv_SYS_w3_forms}
1038 if test -z ""noecho""; then
1039         echo "$ac_t""$w3_forms" 1>&6
1040 fi
1041
1042 if test "${EMACS_cv_SYS_w3_forms}" = "nil"; then
1043         EMACS_cv_SYS_w3_forms=no
1044 fi
1045 if test "${EMACS_cv_SYS_w3_forms}" = "t"; then
1046         EMACS_cv_SYS_w3_forms=yes
1047 fi
1048 HAVE_w3_forms=${EMACS_cv_SYS_w3_forms}
1049
1050 if test -z ""noecho""; then
1051         echo "$ac_t""$HAVE_w3_forms" 1>&6
1052 fi
1053
1054 if test "${HAVE_w3_forms}" = "yes"; then
1055         EMACS_cv_ACCEPTABLE_W3=yes
1056 else
1057         EMACS_cv_ACCEPTABLE_W3=
1058 fi
1059
1060 if test "x${EMACS_cv_ACCEPTABLE_W3}" = "xyes"; then
1061         
1062 elisp="(file-name-directory (locate-library \"w3-forms\"))"
1063 if test -z ""noecho""; then
1064         echo $ac_n "checking for w3_dir""... $ac_c" 1>&6
1065 echo "configure:1066: checking for w3_dir" >&5
1066 fi
1067 if eval "test \"\${EMACS_cv_SYS_w3_dir+set}\" = set"; then
1068   echo $ac_n "(cached) $ac_c" 1>&6
1069 else
1070   
1071         OUTPUT=./conftest-$$
1072         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1073         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1074         retval=`cat ${OUTPUT}`
1075         echo "=> ${retval}" >& 5 2>&1
1076         rm -f ${OUTPUT}
1077         EMACS_cv_SYS_w3_dir=$retval
1078
1079 fi
1080
1081 w3_dir=${EMACS_cv_SYS_w3_dir}
1082 if test -z ""noecho""; then
1083         echo "$ac_t""$w3_dir" 1>&6
1084 fi
1085
1086         EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
1087 fi
1088
1089 fi
1090
1091    # Check whether --with-w3 or --without-w3 was given.
1092 if test "${with_w3+set}" = set; then
1093   withval="$with_w3"
1094    EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` 
1095 fi
1096
1097    W3=${EMACS_cv_ACCEPTABLE_W3}
1098    
1099    if test "x${EMACS_cv_ACCEPTABLE_W3}" = "x"; then
1100         echo "$ac_t""not found" 1>&6
1101    else
1102         echo "$ac_t""${W3}" 1>&6
1103    fi
1104
1105   if test ${EMACS_FLAVOR} = xemacs; then
1106     echo $ac_n "checking where the XEmacs package is""... $ac_c" 1>&6
1107 echo "configure:1108: checking where the XEmacs package is" >&5
1108     # Check whether --with-packagedir or --without-packagedir was given.
1109 if test "${with_packagedir+set}" = set; then
1110   withval="$with_packagedir"
1111   if test x$withval != xyes -a x$withval != x; then
1112         PACKAGEDIR=$withval
1113       else
1114           
1115 elisp="(let (package-dir)\
1116       (if (boundp (quote early-packages))\
1117           (let ((dirs (delq nil (append (if early-package-load-path\
1118                                             early-packages)\
1119                                         (if late-package-load-path\
1120                                             late-packages)\
1121                                         (if last-package-load-path\
1122                                             last-packages)))))\
1123             (while (and dirs (not package-dir))\
1124               (if (file-directory-p (car dirs))\
1125                   (setq package-dir (car dirs)\
1126                         dirs (cdr dirs))))))\
1127       (or package-dir \"\"))"
1128 if test -z ""noecho""; then
1129         echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6
1130 echo "configure:1131: checking for PACKAGEDIR" >&5
1131 fi
1132 if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then
1133   echo $ac_n "(cached) $ac_c" 1>&6
1134 else
1135   
1136         OUTPUT=./conftest-$$
1137         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1138         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1139         retval=`cat ${OUTPUT}`
1140         echo "=> ${retval}" >& 5 2>&1
1141         rm -f ${OUTPUT}
1142         EMACS_cv_SYS_PACKAGEDIR=$retval
1143
1144 fi
1145
1146 PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR}
1147 if test -z ""noecho""; then
1148         echo "$ac_t""$PACKAGEDIR" 1>&6
1149 fi
1150
1151       fi
1152 else
1153     
1154 elisp="(let (package-dir)\
1155       (if (boundp (quote early-packages))\
1156           (let ((dirs (delq nil (append (if early-package-load-path\
1157                                             early-packages)\
1158                                         (if late-package-load-path\
1159                                             late-packages)\
1160                                         (if last-package-load-path\
1161                                             last-packages)))))\
1162             (while (and dirs (not package-dir))\
1163               (if (file-directory-p (car dirs))\
1164                   (setq package-dir (car dirs)\
1165                         dirs (cdr dirs))))))\
1166       (or package-dir \"\"))"
1167 if test -z ""noecho""; then
1168         echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6
1169 echo "configure:1170: checking for PACKAGEDIR" >&5
1170 fi
1171 if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then
1172   echo $ac_n "(cached) $ac_c" 1>&6
1173 else
1174   
1175         OUTPUT=./conftest-$$
1176         echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1177         eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1
1178         retval=`cat ${OUTPUT}`
1179         echo "=> ${retval}" >& 5 2>&1
1180         rm -f ${OUTPUT}
1181         EMACS_cv_SYS_PACKAGEDIR=$retval
1182
1183 fi
1184
1185 PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR}
1186 if test -z ""noecho""; then
1187         echo "$ac_t""$PACKAGEDIR" 1>&6
1188 fi
1189
1190 fi
1191
1192     if test x$PACKAGEDIR = x; then
1193       echo "$ac_t""not found" 1>&6
1194     else
1195       echo "$ac_t""$PACKAGEDIR" 1>&6
1196     fi
1197   else
1198     PACKAGEDIR=
1199   fi
1200   
1201   # Check whether --with-addpath or --without-addpath was given.
1202 if test "${with_addpath+set}" = set; then
1203   withval="$with_addpath"
1204   if test x$withval != xyes -a x$withval != x; then
1205       echo $ac_n "checking where to find the additional elisp libraries""... $ac_c" 1>&6
1206 echo "configure:1207: checking where to find the additional elisp libraries" >&5
1207       ADDITIONAL_LOAD_PATH=$withval
1208       echo "$ac_t""$ADDITIONAL_LOAD_PATH" 1>&6
1209     fi
1210 else
1211   ADDITIONAL_LOAD_PATH=
1212 fi
1213
1214   
1215 trap '' 1 2 15
1216 cat > confcache <<\EOF
1217 # This file is a shell script that caches the results of configure
1218 # tests run on this system so they can be shared between configure
1219 # scripts and configure runs.  It is not useful on other systems.
1220 # If it contains results you don't want to keep, you may remove or edit it.
1221 #
1222 # By default, configure uses ./config.cache as the cache file,
1223 # creating it if it does not exist already.  You can give configure
1224 # the --cache-file=FILE option to use a different cache file; that is
1225 # what configure does when it calls configure scripts in
1226 # subdirectories, so they share the cache.
1227 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1228 # config.status only pays attention to the cache file if you give it the
1229 # --recheck option to rerun configure.
1230 #
1231 EOF
1232 # The following way of writing the cache mishandles newlines in values,
1233 # but we know of no workaround that is simple, portable, and efficient.
1234 # So, don't put newlines in cache variables' values.
1235 # Ultrix sh set writes to stderr and can't be redirected directly,
1236 # and sets the high bit in the cache file unless we assign to the vars.
1237 (set) 2>&1 |
1238   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1239   *ac_space=\ *)
1240     # `set' does not quote correctly, so add quotes (double-quote substitution
1241     # turns \\\\ into \\, and sed turns \\ into \).
1242     sed -n \
1243       -e "s/'/'\\\\''/g" \
1244       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1245     ;;
1246   *)
1247     # `set' quotes correctly as required by POSIX, so do not add quotes.
1248     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1249     ;;
1250   esac >> confcache
1251 if cmp -s $cache_file confcache; then
1252   :
1253 else
1254   if test -w $cache_file; then
1255     echo "updating cache $cache_file"
1256     cat confcache > $cache_file
1257   else
1258     echo "not updating unwritable cache $cache_file"
1259   fi
1260 fi
1261 rm -f confcache
1262
1263 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1264
1265 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1266 # Let make expand exec_prefix.
1267 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1268
1269 # Any assignment to VPATH causes Sun make to only execute
1270 # the first set of double-colon rules, so remove it if not needed.
1271 # If there is a colon in the path, we need to keep it.
1272 if test "x$srcdir" = x.; then
1273   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1274 fi
1275
1276 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1277
1278 # Transform confdefs.h into DEFS.
1279 # Protect against shell expansion while executing Makefile rules.
1280 # Protect against Makefile macro expansion.
1281 cat > conftest.defs <<\EOF
1282 s%#define \([^  ][^     ]*\) *\(.*\)%-D\1=\2%g
1283 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1284 s%\[%\\&%g
1285 s%\]%\\&%g
1286 s%\$%$$%g
1287 EOF
1288 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1289 rm -f conftest.defs
1290
1291
1292 # Without the "./", some shells look in PATH for config.status.
1293 : ${CONFIG_STATUS=./config.status}
1294
1295 echo creating $CONFIG_STATUS
1296 rm -f $CONFIG_STATUS
1297 cat > $CONFIG_STATUS <<EOF
1298 #! /bin/sh
1299 # Generated automatically by configure.
1300 # Run this file to recreate the current configuration.
1301 # This directory was configured as follows,
1302 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1303 #
1304 # $0 $ac_configure_args
1305 #
1306 # Compiler output produced by configure, useful for debugging
1307 # configure, is in ./config.log if it exists.
1308
1309 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1310 for ac_option
1311 do
1312   case "\$ac_option" in
1313   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1314     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1315     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1316   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1317     echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
1318     exit 0 ;;
1319   -help | --help | --hel | --he | --h)
1320     echo "\$ac_cs_usage"; exit 0 ;;
1321   *) echo "\$ac_cs_usage"; exit 1 ;;
1322   esac
1323 done
1324
1325 ac_given_srcdir=$srcdir
1326 ac_given_INSTALL="$INSTALL"
1327
1328 trap 'rm -fr `echo "Makefile lisp/Makefile lisp/dgnuspath.el texi/Makefile etc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1329 EOF
1330 cat >> $CONFIG_STATUS <<EOF
1331
1332 # Protect against being on the right side of a sed subst in config.status.
1333 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1334  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1335 $ac_vpsub
1336 $extrasub
1337 s%@SHELL@%$SHELL%g
1338 s%@CFLAGS@%$CFLAGS%g
1339 s%@CPPFLAGS@%$CPPFLAGS%g
1340 s%@CXXFLAGS@%$CXXFLAGS%g
1341 s%@FFLAGS@%$FFLAGS%g
1342 s%@DEFS@%$DEFS%g
1343 s%@LDFLAGS@%$LDFLAGS%g
1344 s%@LIBS@%$LIBS%g
1345 s%@exec_prefix@%$exec_prefix%g
1346 s%@prefix@%$prefix%g
1347 s%@program_transform_name@%$program_transform_name%g
1348 s%@bindir@%$bindir%g
1349 s%@sbindir@%$sbindir%g
1350 s%@libexecdir@%$libexecdir%g
1351 s%@datadir@%$datadir%g
1352 s%@sysconfdir@%$sysconfdir%g
1353 s%@sharedstatedir@%$sharedstatedir%g
1354 s%@localstatedir@%$localstatedir%g
1355 s%@libdir@%$libdir%g
1356 s%@includedir@%$includedir%g
1357 s%@oldincludedir@%$oldincludedir%g
1358 s%@infodir@%$infodir%g
1359 s%@mandir@%$mandir%g
1360 s%@GNUS_PRODUCT_NAME@%$GNUS_PRODUCT_NAME%g
1361 s%@SET_MAKE@%$SET_MAKE%g
1362 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1363 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1364 s%@INSTALL_DATA@%$INSTALL_DATA%g
1365 s%@MAKEINFO@%$MAKEINFO%g
1366 s%@EMACS@%$EMACS%g
1367 s%@XEMACS@%$XEMACS%g
1368 s%@lispdir@%$lispdir%g
1369 s%@etcdir@%$etcdir%g
1370 s%@HAVE_w3_forms@%$HAVE_w3_forms%g
1371 s%@W3@%$W3%g
1372 s%@PACKAGEDIR@%$PACKAGEDIR%g
1373 s%@ADDITIONAL_LOAD_PATH@%$ADDITIONAL_LOAD_PATH%g
1374
1375 CEOF
1376 EOF
1377
1378 cat >> $CONFIG_STATUS <<\EOF
1379
1380 # Split the substitutions into bite-sized pieces for seds with
1381 # small command number limits, like on Digital OSF/1 and HP-UX.
1382 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1383 ac_file=1 # Number of current file.
1384 ac_beg=1 # First line for current file.
1385 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1386 ac_more_lines=:
1387 ac_sed_cmds=""
1388 while $ac_more_lines; do
1389   if test $ac_beg -gt 1; then
1390     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1391   else
1392     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1393   fi
1394   if test ! -s conftest.s$ac_file; then
1395     ac_more_lines=false
1396     rm -f conftest.s$ac_file
1397   else
1398     if test -z "$ac_sed_cmds"; then
1399       ac_sed_cmds="sed -f conftest.s$ac_file"
1400     else
1401       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1402     fi
1403     ac_file=`expr $ac_file + 1`
1404     ac_beg=$ac_end
1405     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1406   fi
1407 done
1408 if test -z "$ac_sed_cmds"; then
1409   ac_sed_cmds=cat
1410 fi
1411 EOF
1412
1413 cat >> $CONFIG_STATUS <<EOF
1414
1415 CONFIG_FILES=\${CONFIG_FILES-"Makefile lisp/Makefile lisp/dgnuspath.el texi/Makefile etc/Makefile"}
1416 EOF
1417 cat >> $CONFIG_STATUS <<\EOF
1418 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1419   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1420   case "$ac_file" in
1421   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1422        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1423   *) ac_file_in="${ac_file}.in" ;;
1424   esac
1425
1426   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1427
1428   # Remove last slash and all that follows it.  Not all systems have dirname.
1429   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1430   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1431     # The file is in a subdirectory.
1432     test ! -d "$ac_dir" && mkdir "$ac_dir"
1433     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1434     # A "../" for each directory in $ac_dir_suffix.
1435     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1436   else
1437     ac_dir_suffix= ac_dots=
1438   fi
1439
1440   case "$ac_given_srcdir" in
1441   .)  srcdir=.
1442       if test -z "$ac_dots"; then top_srcdir=.
1443       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1444   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1445   *) # Relative path.
1446     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1447     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1448   esac
1449
1450   case "$ac_given_INSTALL" in
1451   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1452   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1453   esac
1454
1455   echo creating "$ac_file"
1456   rm -f "$ac_file"
1457   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1458   case "$ac_file" in
1459   *Makefile*) ac_comsub="1i\\
1460 # $configure_input" ;;
1461   *) ac_comsub= ;;
1462   esac
1463
1464   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1465   sed -e "$ac_comsub
1466 s%@configure_input@%$configure_input%g
1467 s%@srcdir@%$srcdir%g
1468 s%@top_srcdir@%$top_srcdir%g
1469 s%@INSTALL@%$INSTALL%g
1470 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1471 fi; done
1472 rm -f conftest.s*
1473
1474 EOF
1475 cat >> $CONFIG_STATUS <<EOF
1476
1477 EOF
1478 cat >> $CONFIG_STATUS <<\EOF
1479
1480 exit 0
1481 EOF
1482 chmod +x $CONFIG_STATUS
1483 rm -fr confdefs* $ac_clean_files
1484 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1485