]> sourceware.org Git - automake.git/commitdiff
* doc/automake.texi (Requirements) <AC_CONFIG_FILES>: Discuss
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 1 Jan 2005 17:16:56 +0000 (17:16 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 1 Jan 2005 17:16:56 +0000 (17:16 +0000)
specifications with shell variables.
(Optional) <AC_CONFIG_HEADERS, AC_CONFIG_LINKS>: Point to
AC_CONFIG_FILES for this explanation.
* automake.in (substitute_ac_subst_variables_worker,
substitute_ac_subst_variables): Mew functions.
(rewrite_inputs_into_dependencies): Use substitute_ac_subst_variables
to ignore dependencies that contain unAC_SUBSTed shell variables.
(handle_configure): Likewise, do not output rules for
AC_CONFIG_HEADERS, AC_CONFIG_FILES, and AC_CONFIG_LINKS targets that
unAC_SUBSTed contain shell variables.
* tests/autohdr4.test: Use an AC_SUBST variable in a specification.
* tests/output11.test, tests/output12.test: New files.
* tests/Makefile.am (TESTS): Add output11.test and output12.test.

18 files changed:
ChangeLog
Makefile.in
NEWS
automake.in
configure
doc/Makefile.in
doc/automake.texi
doc/stamp-vti
doc/version.texi
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/autohdr4.test
tests/output12.test [new file with mode: 0755]

index b260f8e3f5649aec5ad306eb0f4e340b8f9d7ccf..a809ec9e25dec1261ec22a02308d8d02144125ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2005-01-01  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * doc/automake.texi (Requirements) <AC_CONFIG_FILES>: Discuss
+       specifications with shell variables.
+       (Optional) <AC_CONFIG_HEADERS, AC_CONFIG_LINKS>: Point to
+       AC_CONFIG_FILES for this explanation.
+       * automake.in (substitute_ac_subst_variables_worker,
+       substitute_ac_subst_variables): Mew functions.
+       (rewrite_inputs_into_dependencies): Use substitute_ac_subst_variables
+       to ignore dependencies that contain unAC_SUBSTed shell variables.
+       (handle_configure): Likewise, do not output rules for
+       AC_CONFIG_HEADERS, AC_CONFIG_FILES, and AC_CONFIG_LINKS targets that
+       unAC_SUBSTed contain shell variables.
+       * tests/autohdr4.test: Use an AC_SUBST variable in a specification.
+       * tests/output11.test, tests/output12.test: New files.
+       * tests/Makefile.am (TESTS): Add output11.test and output12.test.
+
        * aclocal.in (parse_arguments, write_aclocal): Bump copyright year.
        * automake.in ($gen_copyright, version): Likewise.
 
index c9a94f6668281c45064eec8ab5042e353974345b..8d416afb2cf03f182eb567532207c865dfad00e2 100644 (file)
@@ -131,20 +131,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
diff --git a/NEWS b/NEWS
index 0d2d877702e32acd6d043eadd911db2da8898ad7..0f9748f882d18049c3871033377fbd1696393217 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -36,6 +36,15 @@ New in 1.9a:
     flavors, including optional formats such as dvi, ps, or info even
     when `no-installinfo' is used.)
 
+  - Automake no longer complains if input files for AC_CONFIG_FILES
+    are specified using shell variables.
+
+  - clean, distribution, or rebuild rules are normally disabled for
+    inputs and outputs of AC_CONFIG_FILES, AC_CONFIG_HEADERS, and
+    AC_CONFIG_LINK specified using shell variable.  However if these
+    variables are used as ${VAR}, and AC_SUBSTed, then Automake will
+    be able to output rules anyway.
+    (See the Automake documentation for AC_CONFIG_FILES.)
 \f
 New in 1.9:
 
index 3992b2c5538f732728c99a01e77821ff22118bb7..f22edd4b487a386fd14adf125064906d74fae087 100755 (executable)
@@ -3734,6 +3734,25 @@ sub scan_aclocal_m4 ()
 }
 
 
+# Helper function for substitute_ac_subst_variables.
+sub substitute_ac_subst_variables_worker($)
+{
+  my ($token) = @_;
+  return "\@$token\@" if var $token;
+  return "\${$token\}";
+}
+
+# substitute_ac_subst_variables ($TEXT)
+# -------------------------------------
+# Replace any occurence of ${FOO} in $TEXT by @FOO@ if FOO is an AC_SUBST
+# variable.
+sub substitute_ac_subst_variables ($)
+{
+  my ($text) = @_;
+  $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge;
+  return $text;
+}
+
 # @DEPENDENCIES
 # &prepend_srcdir (@INPUTS)
 # -------------------------
@@ -3775,6 +3794,9 @@ sub rewrite_inputs_into_dependencies ($@)
 
   for my $i (@inputs)
     {
+      # We cannot create dependencies on shell variables.
+      next if (substitute_ac_subst_variables $i) =~ /\$/;
+
       if (exists $ac_config_files_location{$i})
        {
          my $di = dirname $i;
@@ -3795,7 +3817,7 @@ sub rewrite_inputs_into_dependencies ($@)
        {
          msg ('error', $ac_config_files_location{$file},
               "required file `$i' not found")
-           unless exists $output_files{$i} || -f $i;
+           unless $i =~ /\$/ || exists $output_files{$i} || -f $i;
          ($i) = prepend_srcdir ($i);
          push_dist_common ($i);
        }
@@ -3894,7 +3916,10 @@ sub handle_configure ($$$@)
          # This will also distribute all inputs.
          @ins = rewrite_inputs_into_dependencies ($config_h_path, @ins);
 
-         # Header defined and in this directory.
+         # Cannot define rebuild rules for filenames with shell variables.
+         next if (substitute_ac_subst_variables $config_h_path) =~ /\$/;
+
+         # Header defined in this directory.
          my @files;
          if (-f $config_h_path . '.top')
            {
@@ -4033,6 +4058,9 @@ sub handle_configure ($$$@)
 
       my @rewritten_inputs = rewrite_inputs_into_dependencies ($file, @inputs);
 
+      # Cannot output rules for shell variables.
+      next if (substitute_ac_subst_variables $local) =~ /\$/;
+
       $output_rules .= ($local . ': '
                        . '$(top_builddir)/config.status '
                        . "@rewritten_inputs\n"
@@ -4055,7 +4083,7 @@ sub handle_configure ($$$@)
       my $where = $ac_config_files_location{$link};
 
       # Skip destinations that contain shell variables.
-      if ($link !~ /\$/)
+      if ((substitute_ac_subst_variables $link) !~ /\$/)
        {
          # We skip links that aren't in this directory.  However, if
          # the link's directory does not have a Makefile, and we are
@@ -4078,7 +4106,7 @@ sub handle_configure ($$$@)
        }
 
       # Do not process sources that contain shell variables.
-      if ($file !~ /\$/)
+      if ((substitute_ac_subst_variables $file) !~ /\$/)
        {
          my $fd = dirname ($file);
 
index 663c0f5b0dfa187c69738997ceb8d6ceca6dfb88..a3499bda5677c29adbcb4545cac82077d10af415 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59a for GNU Automake 1.9a.
+# Generated by GNU Autoconf 2.59c for GNU Automake 1.9a.
 #
 # Report bugs to <bug-automake@gnu.org>.
 #
@@ -76,7 +76,7 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+  { echo "$as_me: error: cannot find myself; rerun with an absolute file name" >&2
    { (exit 1); exit 1; }; }
 fi
 
@@ -205,7 +205,7 @@ done
 
 
       for as_shell in $as_candidate_shells $SHELL; do
-        if { $as_shell 2> /dev/null <<\_ASEOF
+        if { ($as_shell) 2> /dev/null <<\_ASEOF
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
@@ -225,7 +225,7 @@ _ASEOF
 }; then
   CONFIG_SHELL=$as_shell
               as_have_required=yes
-              if { $as_shell 2> /dev/null <<\_ASEOF
+              if { ($as_shell) 2> /dev/null <<\_ASEOF
 # Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
@@ -456,7 +456,19 @@ else
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -506,7 +518,7 @@ PACKAGE_STRING='GNU Automake 1.9a'
 PACKAGE_BUGREPORT='bug-automake@gnu.org'
 
 ac_unique_file="automake.in"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os am_AUTOCONF INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY GREP EGREP FGREP LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os am_AUTOCONF INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar APIVERSION pkgvdatadir PERL TEX LN MODIFICATION_DELAY GREP EGREP FGREP LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -534,20 +546,29 @@ x_libraries=NONE
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
@@ -561,7 +582,9 @@ do
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -583,12 +606,18 @@ do
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
   -disable-* | --disable-*)
     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
@@ -598,6 +627,11 @@ do
     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
     eval "enable_$ac_feature=no" ;;
 
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
   -enable-* | --enable-*)
     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
@@ -636,6 +670,12 @@ do
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -660,13 +700,16 @@ do
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -731,6 +774,16 @@ do
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -852,7 +905,7 @@ if test -n "$ac_prev"; then
    { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute paths.
+# Be sure to have absolute directory names.
 for ac_var in exec_prefix prefix
 do
   eval ac_val=$`echo $ac_var`
@@ -863,9 +916,11 @@ do
   esac
 done
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-             localstatedir libdir includedir oldincludedir infodir mandir
+# Be sure to have absolute directory names.
+for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir \
+              sharedstatedir localstatedir includedir oldincludedir \
+              docdir infodir htmldir dvidir pdfdir psdir libdir \
+              localedir mandir
 do
   eval ac_val=$`echo $ac_var`
   case $ac_val in
@@ -995,15 +1050,22 @@ Fine tuning of the installation directories:
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR          info documentation [DATAROOTDIR/info]
+  --localedir=DIR        locale-specific message catalogs [DATAROOTDIR/locale]
+  --mandir=DIR           man documentation [DATAROOTDIR/man]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/automake]
+  --htmldir=DIR          html documentation [DOCDIR]
+  --dvidir=DIR           dvi documentation [DOCDIR]
+  --pdfdir=DIR           pdf documentation [DOCDIR]
+  --psdir=DIR            ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1051,15 +1113,15 @@ case $srcdir in
     else
        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
     fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
     ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
+  *) # Relative name.
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
+# Do not use `cd foo && pwd` to compute absolute names, because
 # the directories may not exist.
 case `pwd` in
 .) ac_abs_builddir="$ac_dir";;
@@ -1113,7 +1175,7 @@ esac
     else
       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi
-    cd $ac_popdir
+    cd "$ac_popdir"
   done
 fi
 
@@ -1121,7 +1183,7 @@ test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
 GNU Automake configure 1.9a
-generated by GNU Autoconf 2.59a
+generated by GNU Autoconf 2.59c
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
 2003, 2004 Free Software Foundation, Inc.
@@ -1136,7 +1198,7 @@ This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by GNU Automake $as_me 1.9a, which was
-generated by GNU Autoconf 2.59a.  Invocation command line was
+generated by GNU Autoconf 2.59c.  Invocation command line was
 
   $ $0 $@
 
@@ -1577,7 +1639,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -1602,10 +1664,10 @@ fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL=$ac_cv_path_install
   else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
+    # removed, or if the value is a relative name.
     INSTALL=$ac_install_sh
   fi
 fi
@@ -1742,7 +1804,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -1771,6 +1833,7 @@ if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
        @echo 'ac_maketemp="$(MAKE)"'
 _ACEOF
@@ -1874,7 +1937,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -1912,7 +1975,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_STRIP="strip"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2001,7 +2064,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2054,7 +2117,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_TEX="tex"
     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2209,28 +2272,7 @@ set dummy grep ggrep; ac_prog_name=$2
 if test "${ac_cv_path_GREP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/GREPXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/GREP$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-ac_path_GREP_found=false
+  ac_path_GREP_found=false
 # Loop through the user's path and test for each of PROGNAME-LIST
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_dummy="$PATH:/usr/xpg4/bin"
@@ -2241,23 +2283,22 @@ do
   for ac_prog in grep ggrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    test -f "$ac_path_GREP" || continue
-    $ac_path_GREP_found || if $as_executable_p "$ac_path_GREP"; then
-  # Check for GNU ac_path_GREP and select it if it is found.
+    { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue
+    # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 if "$ac_path_GREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:
 else
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
   while :
   do
-    cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
-    mv "$tmp/conftest.tmp" "$tmp/conftest.in"
-    cp "$tmp/conftest.in" "$tmp/conftest.nl"
-    echo 'GREP' >> "$tmp/conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
-    diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     ac_count=`expr $ac_count + 1`
     if test $ac_count -gt ${ac_path_GREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
@@ -2267,9 +2308,9 @@ else
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
+  rm -f conftest.*
 fi
 
-fi
 
     $ac_path_GREP_found && break 3
   done
@@ -2277,7 +2318,6 @@ done
 
 done
 
-rm -rf "$tmp"
 
 fi
 
@@ -2311,28 +2351,7 @@ set dummy egrep; ac_prog_name=$2
 if test "${ac_cv_path_EGREP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/EGREPXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/EGREP$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-ac_path_EGREP_found=false
+  ac_path_EGREP_found=false
 # Loop through the user's path and test for each of PROGNAME-LIST
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_dummy="$PATH:/usr/xpg4/bin"
@@ -2343,23 +2362,22 @@ do
   for ac_prog in egrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    test -f "$ac_path_EGREP" || continue
-    $ac_path_EGREP_found || if $as_executable_p "$ac_path_EGREP"; then
-  # Check for GNU ac_path_EGREP and select it if it is found.
+    { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue
+    # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 if "$ac_path_EGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:
 else
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
   while :
   do
-    cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
-    mv "$tmp/conftest.tmp" "$tmp/conftest.in"
-    cp "$tmp/conftest.in" "$tmp/conftest.nl"
-    echo 'EGREP' >> "$tmp/conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
-    diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     ac_count=`expr $ac_count + 1`
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
@@ -2369,9 +2387,9 @@ else
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
+  rm -f conftest.*
 fi
 
-fi
 
     $ac_path_EGREP_found && break 3
   done
@@ -2379,7 +2397,6 @@ done
 
 done
 
-rm -rf "$tmp"
 
 fi
 
@@ -2414,28 +2431,7 @@ set dummy fgrep; ac_prog_name=$2
 if test "${ac_cv_path_FGREP+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
-  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/FGREPXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=$TMPDIR/FGREP$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
-   { (exit 1); exit 1; }
-}
-ac_path_FGREP_found=false
+  ac_path_FGREP_found=false
 # Loop through the user's path and test for each of PROGNAME-LIST
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 as_dummy="$PATH:/usr/xpg4/bin"
@@ -2446,23 +2442,22 @@ do
   for ac_prog in fgrep; do
   for ac_exec_ext in '' $ac_executable_extensions; do
     ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-    test -f "$ac_path_FGREP" || continue
-    $ac_path_FGREP_found || if $as_executable_p "$ac_path_FGREP"; then
-  # Check for GNU ac_path_FGREP and select it if it is found.
+    { test -f "$ac_path_FGREP" && $as_executable_p "$ac_path_FGREP"; } || continue
+    # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 if "$ac_path_FGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:
 else
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
   while :
   do
-    cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
-    mv "$tmp/conftest.tmp" "$tmp/conftest.in"
-    cp "$tmp/conftest.in" "$tmp/conftest.nl"
-    echo 'FGREP' >> "$tmp/conftest.nl"
-    "$ac_path_FGREP" FGREP < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
-    diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
     ac_count=`expr $ac_count + 1`
     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
@@ -2472,9 +2467,9 @@ else
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
+  rm -f conftest.*
 fi
 
-fi
 
     $ac_path_FGREP_found && break 3
   done
@@ -2482,7 +2477,6 @@ done
 
 done
 
-rm -rf "$tmp"
 
 fi
 
@@ -2721,8 +2715,8 @@ if test "x$as_myself" = x; then
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+  { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute file name" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute file name" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
@@ -2859,7 +2853,19 @@ else
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+# Find out whether ``test -x'' works.  Don't use a zero-byte file, as
+# systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+  as_executable_p="test -x"
+else
+  as_executable_p=:
+fi
+rm -f conf$$.file
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -2892,7 +2898,7 @@ _ASBOX
 cat >&5 <<_CSEOF
 
 This file was extended by GNU Automake $as_me 1.9a, which was
-generated by GNU Autoconf 2.59a.  Invocation command line was
+generated by GNU Autoconf 2.59c.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -2947,7 +2953,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 GNU Automake config.status 1.9a
-configured by $0, generated by GNU Autoconf 2.59a,
+configured by $0, generated by GNU Autoconf 2.59c,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 Copyright (C) 2004 Free Software Foundation, Inc.
@@ -3082,24 +3088,23 @@ if $ac_need_defaults; then
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
 # creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
 $debug ||
 {
-  trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
+  trap 'exit_status=$?; rm -fr "$tmp" && exit $exit_status' 0
   trap '{ (exit 1); exit 1; }' 1 2 13 15
 }
-
 # Create a (secure) tmp directory for tmp files.
 
 {
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  tmp=`(umask 077 && mktemp -d -q "./confXXXXXX") 2>/dev/null` &&
   test -n "$tmp" && test -d "$tmp"
 }  ||
 {
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
 } ||
 {
    echo "$me: cannot create a temporary directory in ." >&2
@@ -3119,7 +3124,7 @@ cat >>$CONFIG_STATUS <<_ACEOF
 if test -n "\$CONFIG_FILES"; then
   # Protect against being on the right side of a sed subst in config.status.
   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp/subs.sed" <<\\CEOF
 s,@SHELL@,$SHELL,;t t
 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
@@ -3133,14 +3138,21 @@ s,@program_transform_name@,$program_transform_name,;t t
 s,@bindir@,$bindir,;t t
 s,@sbindir@,$sbindir,;t t
 s,@libexecdir@,$libexecdir,;t t
+s,@datarootdir@,$datarootdir,;t t
 s,@datadir@,$datadir,;t t
 s,@sysconfdir@,$sysconfdir,;t t
 s,@sharedstatedir@,$sharedstatedir,;t t
 s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
 s,@includedir@,$includedir,;t t
 s,@oldincludedir@,$oldincludedir,;t t
+s,@docdir@,$docdir,;t t
 s,@infodir@,$infodir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@dvidir@,$dvidir,;t t
+s,@pdfdir@,$pdfdir,;t t
+s,@psdir@,$psdir,;t t
+s,@libdir@,$libdir,;t t
+s,@localedir@,$localedir,;t t
 s,@mandir@,$mandir,;t t
 s,@build_alias@,$build_alias,;t t
 s,@host_alias@,$host_alias,;t t
@@ -3203,11 +3215,11 @@ _ACEOF
   ac_sed_cmds=
   while $ac_more_lines; do
     if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+      sed "1,${ac_beg}d; ${ac_end}q" "$tmp/subs.sed" >"$tmp/subs.frag"
     else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+      sed "${ac_end}q" "$tmp/subs.sed" >"$tmp/subs.frag"
     fi
-    if test ! -s $tmp/subs.frag; then
+    if test ! -s "$tmp/subs.frag"; then
       ac_more_lines=false
     else
       # The purpose of the label and of the branching condition is to
@@ -3215,11 +3227,11 @@ _ACEOF
       # is no need to browse any of the substitutions).
       # These are the two extra sed commands mentioned above.
       (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp/subs.frag") >"$tmp/subs-$ac_sed_frag.sed"
       if test -z "$ac_sed_cmds"; then
-       ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+       ac_sed_cmds="sed -f '$tmp/subs-$ac_sed_frag.sed'"
       else
-       ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+       ac_sed_cmds="$ac_sed_cmds | sed -f '$tmp/subs-$ac_sed_frag.sed'"
       fi
       ac_sed_frag=`expr $ac_sed_frag + 1`
       ac_beg=$ac_end
@@ -3237,7 +3249,7 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case $ac_file in
   - | *:- | *:-:* ) # input from stdin
-       cat >$tmp/stdin
+       cat >"$tmp/stdin"
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
@@ -3301,15 +3313,15 @@ case $srcdir in
     else
        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
     fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
     ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
+  *) # Relative name.
     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
     ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
+# Do not use `cd foo && pwd` to compute absolute names, because
 # the directories may not exist.
 case `pwd` in
 .) ac_abs_builddir="$ac_dir";;
@@ -3375,7 +3387,7 @@ echo "$as_me: creating $ac_file" >&6;}
   ac_file_inputs=`IFS=:
     for f in $ac_file_in; do
       case $f in
-      -) echo $tmp/stdin ;;
+      -) echo "$tmp/stdin" ;;
       [\\/$]*)
         # Absolute (can't be DOS-style, as IFS=:)
         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
@@ -3415,13 +3427,13 @@ s,@abs_builddir@,$ac_abs_builddir,;t t
 s,@top_builddir@,$ac_top_builddir,;t t
 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
 s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
+" $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp/out"
+  rm -f "$tmp/stdin"
   if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
+    mv "$tmp/out" $ac_file
   else
-    cat $tmp/out
-    rm -f $tmp/out
+    cat "$tmp/out"
+    rm -f "$tmp/out"
   fi
 
   # Run the commands associated with the file.
index 6ce5e91c9fa6140cc876432b5f82cd3cbb50bdd6..44919de3f725d5e9dbdfa8a94d0d72f7ebb750ef 100644 (file)
@@ -125,20 +125,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index 88ca8e6d503ec85fadb949982b4cbd50bcc72caf..38539714f82117fef0a86b8bb6f6f018f253b13d 100644 (file)
@@ -14,7 +14,7 @@ This manual is for @acronym{GNU} Automake (version @value{VERSION},
 Makefiles from template files.
 
 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-2003, 2004 Free Software Foundation, Inc.
+2003, 2004, 2005 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -1301,7 +1301,93 @@ will generate the first @file{.in} input file for which a @file{.am}
 file exists.  If no such file exists the output file is not considered
 to be Automake generated.
 
-Files created by @code{AC_CONFIG_FILES} are removed by @code{make distclean}.
+Files created by @code{AC_CONFIG_FILES}, be they Automake
+@file{Makefile}s or not, are all removed by @code{make distclean}.
+Their inputs are automatically distributed, except for input that
+turns out the be the outputs of prior @code{AC_CONFIG_FILES} commands.
+Finally, rebuild rules are generated in the Automake @file{Makefile}
+in the subdirectory of the output file, if there is one, or in the
+top-level @file{Makefile} otherwise.
+
+The above machinery (cleaning, distributing, and rebuilding) works
+fine only if the @code{AC_CONFIG_FILES} specifications contain only
+literals.  If part of the specification uses shell variables,
+@command{automake} will not be able to fulfil this setup, and you will
+have to complete the missing bits by hand.  For instance on
+
+@example
+file=input
+@dots{}
+AC_CONFIG_FILES([output:$file],, [file=$file])
+@end example
+
+@noindent
+@command{automake} will output rules to clean @file{output}, and
+rebuild it.  However the rebuild rule will not depend on @file{input},
+and this file will not be distributed either.  (You must add
+@code{EXTRA_DIST = input} to your @file{Makefile} if @file{input} is a
+source file.)
+
+Similarly
+
+@example
+file=output
+file2=out:in
+@dots{}
+AC_CONFIG_FILES([$file:input],, [file=$file])
+AC_CONFIG_FILES([$file2],, [file2=$file2])
+@end example
+
+@noindent
+will only cause @file{input} to be distributed.  No file will be
+cleaned automatically (add @code{DISTCLEANFILES = output out}
+yourself), and no rebuild rule will be output.
+
+Obviously @command{automake} cannot guess what value @code{$file} is
+going to hold later when @file{configure} is run, and it cannot use
+the shell variable @code{$file} in a @file{Makefile}.  However, if you
+make reference to @code{$file} as @code{$@{file@}} (i.e., in a way
+that is compatible with @command{make}'s syntax) and furthermore use
+@code{AC_SUBST} to ensure that @code{$@{file@}} is meaningful in a
+@file{Makefile}, then @command{automake} will be able to use
+@code{$@{file@}} to generate all these rules.  For instance here is
+how the Automake package itself generates versioned scripts for its
+test suite:
+
+@example
+AC_SUBST([APIVERSION], @dots{})
+@dots{}
+AC_CONFIG_FILES([tests/aclocal-$@{APIVERSION@}:tests/aclocal.in],
+                [chmod +x tests/aclocal-$@{APIVERSION@}],
+                [APIVERSION=$APIVERSION])
+AC_CONFIG_FILES([tests/automake-$@{APIVERSION@}:tests/automake.in],
+                [chmod +x tests/automake-$@{APIVERSION@}])
+@end example
+
+@noindent
+Here cleaning, distributing, and rebuilding are done automatically,
+because @code{$@{APIVERSION@}} is know at @code{make}-time.
+
+Note that you should not use shell variables to declare
+@file{Makefile} files for which @command{automake} must create
+@file{Makefile.in}.  Even @code{AC_SUBST} does not help here, because
+@command{automake} needs to know the filename at run-time in order to
+check whether @file{Makefile.am} exists.  (In the very hairy case that
+your setup requires such use of variables, you will have to tell
+Automake which @file{Makefile.in}s to generate on the command-line.)
+
+To summarize:
+@itemize @bullet
+@item
+Use literals for @file{Makefile}s, and for other files whenever possible.
+@item
+Use @code{$file} (or @code{$@{file@}} without @code{AC_SUBST([file])})
+for files that @command{automake} should ignore.
+@item
+Use @code{$@{file@}} and @code{AC_SUBST([file])} for files
+that @command{automake} should not ignore.
+@end itemize
+
 @end table
 
 
@@ -1322,10 +1408,18 @@ Automake will generate rules to rebuild these headers.  Older versions
 of Automake required the use of @code{AM_CONFIG_HEADER}
 (@pxref{Macros}); this is no longer the case today.
 
+As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
+specification using shell variables will be ignored as far as
+cleaning, distributing, and rebuilding is concerned.
+
 @item AC_CONFIG_LINKS
-Automake will generate rules to remove @file{configure} generated links on
-@code{make distclean} and to distribute named source files as part of
-@code{make dist}.
+Automake will generate rules to remove @file{configure} generated
+links on @code{make distclean} and to distribute named source files as
+part of @code{make dist}.
+
+As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
+specification using shell variables will be ignored as far as cleaning
+and distributing is concerned.  (There is no rebuild rules for links.)
 
 @item AC_CONFIG_AUX_DIR
 Automake will look for various helper scripts, such as
index 21e70223e035c95ea6b971e9184bbfb3c1e8174b..317279177eac9c7586f3f68a40635f1370cc0d48 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 31 December 2004
-@set UPDATED-MONTH December 2004
+@set UPDATED 1 January 2005
+@set UPDATED-MONTH January 2005
 @set EDITION 1.9a
 @set VERSION 1.9a
index 21e70223e035c95ea6b971e9184bbfb3c1e8174b..317279177eac9c7586f3f68a40635f1370cc0d48 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 31 December 2004
-@set UPDATED-MONTH December 2004
+@set UPDATED 1 January 2005
+@set UPDATED-MONTH January 2005
 @set EDITION 1.9a
 @set VERSION 1.9a
index a3d76340f4b2a316f9ecee375fc51cbcb2cd3067..197810e2be8448edba4a06638898abd05a695d0a 100644 (file)
@@ -125,20 +125,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index 3001f26c780556224ba36b8fab47c16e8aa2325a..4c14115a873920140db07df15bac2ef1b2cdadfc 100644 (file)
@@ -101,20 +101,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index ac949d0236cf22d463808e2f87aba7a66d8d8aec..3c780275645dc3bee5ff358863d66447a9a99771 100644 (file)
@@ -128,20 +128,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index 3d486553b96fbd649e99f3a3fa019680db2a53db..db37bf61cf263414ae68d5d57b51b5807a1b289d 100644 (file)
@@ -112,20 +112,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index 94085884daa447ef9343747d4fd6a40a1b81bebd..ae2388a4fe0b224473573f555453151489da9c19 100644 (file)
@@ -112,20 +112,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
index 6753ccbba2a5da6032b22cfcd59373449f8591aa..f04530ddc2cde8e0f77805e8169b9232e21a12cf 100644 (file)
@@ -370,6 +370,8 @@ output7.test \
 output8.test \
 output9.test \
 output10.test \
+output11.test \
+output12.test \
 overrid.test \
 parse.test \
 percent.test \
index b2ae62e9bb445e31d400f742086007ad1eb9442b..e339f0a691b2dbf26058efb3cf685eacb697348d 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -102,20 +102,27 @@ build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host_alias = @host_alias@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 pkgvdatadir = @pkgvdatadir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
@@ -489,6 +496,8 @@ output7.test \
 output8.test \
 output9.test \
 output10.test \
+output11.test \
+output12.test \
 overrid.test \
 parse.test \
 percent.test \
index 50dc2260f5137726b91ed7cae5316b7773c051d6..eb9f72ab4f4cf74c0510b61238eeedd24dcc128d 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -26,9 +26,11 @@ required=gcc
 
 set -e
 
-cat >>configure.in <<EOF
+cat >>configure.in <<'EOF'
 AC_PROG_CC
-AC_CONFIG_HEADERS([defs.h config.h:sub1/config.top:sub2/config.bot])
+AC_SUBST([BOT], [bot])
+AC_CONFIG_HEADERS([defs.h config.h:sub1/config.top:sub2/config.${BOT}],,
+                  [BOT=$BOT])
 AC_CONFIG_FILES([sub3/Makefile])
 AC_OUTPUT
 EOF
diff --git a/tests/output12.test b/tests/output12.test
new file mode 100755 (executable)
index 0000000..2e8b785
--- /dev/null
@@ -0,0 +1,66 @@
+#! /bin/sh
+# Copyright (C) 2005  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU Automake is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Make sure an AC_CONFIG_FILES process filenames with AC_SUBST variables.
+
+. ./defs || exit 1
+
+set -e
+
+cat >> configure.in << \END
+AC_SUBST([FOO], [foo])
+AC_SUBST([file1], [this.in])
+echo @FOO@ >$file1
+AC_SUBST([file2], [that])
+AC_SUBST([file3], [mumble])
+AC_SUBST([file4], [foo])
+AC_CONFIG_FILES([this:$file1],, [file1=$file1])
+AC_CONFIG_FILES([sub/this:$file1])
+AC_CONFIG_FILES([${file2}:this],, [file2=$file2])
+AC_CONFIG_FILES([${file3}],, [file3=$file3])
+AC_CONFIG_FILES([${file4}:foo.in],, [file4=$file4])
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<\EOF
+SUBDIRS = sub
+DISTCLEANFILES = $(file1)
+dist-hook:
+       test -f $(distdir)/foo.in
+       test ! -f $(distdir)/this
+EOF
+
+echo @FOO@ >mumble.in
+echo @FOO@ >foo.in
+: >sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE distcheck
+cd sub
+rm this
+$MAKE this
+grep foo this
This page took 0.081781 seconds and 5 git commands to generate.