handle absolute input file names.
From Alexandre Oliva.
+2000-07-13 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS): Properly
+ handle absolute input file names.
+ From Alexandre Oliva.
+
2000-07-12 Martin Wilck <martin@tropos.de>
* aclang.m4 (AC_PROG_F77): Delete AC_BEFORE(AC_PROG_CPP) that
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- *) if test -f "$f"; then
- # Build tree or absolute
- echo $f
- elif test -f "$ac_given_srcdir/$f"; then
- # Source tree
- echo $ac_given_srcdir/$f
- else
- # /dev/null tree
- AC_MSG_ERROR([cannot find input file \\`$f'])
- fi;;
- esac
- done`
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [[\\/$]]* | ?:[[\\/]]*)
+ # Absolute
+ test -f "$f" || AC_MSG_ERROR([cannot find input file \\`$f'])
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$ac_given_srcdir/$f"; then
+ # Source tree
+ echo $ac_given_srcdir/$f
+ else
+ # /dev/null tree
+ AC_MSG_ERROR([cannot find input file \\`$f'])
+ fi;;
+ esac
+ done`
EOF
cat >>$CONFIG_STATUS <<EOF
dnl Neutralize VPATH when `$srcdir' = `.'.
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- *) if test -f "$f"; then
- # Build tree or absolute
- echo $f
- elif test -f "$ac_given_srcdir/$f"; then
- # Source tree
- echo $ac_given_srcdir/$f
- else
- # /dev/null tree
- AC_MSG_ERROR([cannot find input file \\`$f'])
- fi;;
- esac
- done`
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [[\\/$]]* | ?:[[\\/]]*)
+ # Absolute
+ test -f "$f" || AC_MSG_ERROR([cannot find input file \\`$f'])
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$ac_given_srcdir/$f"; then
+ # Source tree
+ echo $ac_given_srcdir/$f
+ else
+ # /dev/null tree
+ AC_MSG_ERROR([cannot find input file \\`$f'])
+ fi;;
+ esac
+ done`
# Remove the trailing spaces.
sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- *) if test -f "$f"; then
- # Build tree or absolute
- echo $f
- elif test -f "$ac_given_srcdir/$f"; then
- # Source tree
- echo $ac_given_srcdir/$f
- else
- # /dev/null tree
- AC_MSG_ERROR([cannot find input file \\`$f'])
- fi;;
- esac
- done`
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [[\\/$]]* | ?:[[\\/]]*)
+ # Absolute
+ test -f "$f" || AC_MSG_ERROR([cannot find input file \\`$f'])
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$ac_given_srcdir/$f"; then
+ # Source tree
+ echo $ac_given_srcdir/$f
+ else
+ # /dev/null tree
+ AC_MSG_ERROR([cannot find input file \\`$f'])
+ fi;;
+ esac
+ done`
EOF
cat >>$CONFIG_STATUS <<EOF
dnl Neutralize VPATH when `$srcdir' = `.'.
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- *) if test -f "$f"; then
- # Build tree or absolute
- echo $f
- elif test -f "$ac_given_srcdir/$f"; then
- # Source tree
- echo $ac_given_srcdir/$f
- else
- # /dev/null tree
- AC_MSG_ERROR([cannot find input file \\`$f'])
- fi;;
- esac
- done`
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [[\\/$]]* | ?:[[\\/]]*)
+ # Absolute
+ test -f "$f" || AC_MSG_ERROR([cannot find input file \\`$f'])
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$ac_given_srcdir/$f"; then
+ # Source tree
+ echo $ac_given_srcdir/$f
+ else
+ # /dev/null tree
+ AC_MSG_ERROR([cannot find input file \\`$f'])
+ fi;;
+ esac
+ done`
# Remove the trailing spaces.
sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in