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