Detect a potential infinite loop in ./configure in AC_DEFINE_DIR.

Fixes the changes made to AC_DEFINE_DIR in
c74836dc4a5bde1e0bf38da58053bf5f28da8ff5.
This commit is contained in:
Nathan Phillip Brink 2012-03-02 01:51:30 +00:00 committed by JD Horelick
parent 68ebdf7f1e
commit ee269f46f5
3 changed files with 52 additions and 0 deletions

5
aclocal.m4 vendored
View File

@ -4,9 +4,14 @@ AC_DEFUN([AC_DEFINE_DIR], [
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo [$]$2` last_ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]last_ac_define_dir` ac_define_dir=`eval echo [$]last_ac_define_dir`
ac_define_dir_counter=0
while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do
last_ac_define_dir="[$]ac_define_dir" last_ac_define_dir="[$]ac_define_dir"
ac_define_dir=`eval echo [$]last_ac_define_dir` ac_define_dir=`eval echo [$]last_ac_define_dir`
AS_VAR_ARITH([ac_define_dir_counter], [$ac_define_dir_counter + 1])
AS_VAR_IF([ac_define_dir_counter], [128],
[AC_MSG_ERROR([detected recusive directory expansion when expanding $1=[$]$2: [$]ac_define_dir])
break])
done done
$1="$ac_define_dir" $1="$ac_define_dir"
AC_SUBST($1) AC_SUBST($1)

42
configure vendored
View File

@ -5401,9 +5401,15 @@ pkglibdir='${libdir}/${PACKAGE_TARNAME}'
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkglocalstatedir` last_ac_define_dir=`eval echo $pkglocalstatedir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding PKGLOCALSTATEDIR=$pkglocalstatedir: $ac_define_dir" "$LINENO" 5
break
fi
done done
PKGLOCALSTATEDIR="$ac_define_dir" PKGLOCALSTATEDIR="$ac_define_dir"
@ -5419,9 +5425,15 @@ _ACEOF
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkglibexecdir` last_ac_define_dir=`eval echo $pkglibexecdir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding PKGLIBEXECDIR=$pkglibexecdir: $ac_define_dir" "$LINENO" 5
break
fi
done done
PKGLIBEXECDIR="$ac_define_dir" PKGLIBEXECDIR="$ac_define_dir"
@ -7288,9 +7300,15 @@ fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $sysconfdir` last_ac_define_dir=`eval echo $sysconfdir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding ETC_DIR=$sysconfdir: $ac_define_dir" "$LINENO" 5
break
fi
done done
ETC_DIR="$ac_define_dir" ETC_DIR="$ac_define_dir"
@ -7325,9 +7343,15 @@ fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $logdir` last_ac_define_dir=`eval echo $logdir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding LOG_DIR=$logdir: $ac_define_dir" "$LINENO" 5
break
fi
done done
LOG_DIR="$ac_define_dir" LOG_DIR="$ac_define_dir"
@ -7371,9 +7395,15 @@ fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $helpdir` last_ac_define_dir=`eval echo $helpdir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding HELP_DIR=$helpdir: $ac_define_dir" "$LINENO" 5
break
fi
done done
HELP_DIR="$ac_define_dir" HELP_DIR="$ac_define_dir"
@ -7418,9 +7448,15 @@ fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $moduledir` last_ac_define_dir=`eval echo $moduledir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding MODULE_DIR=$moduledir: $ac_define_dir" "$LINENO" 5
break
fi
done done
MODULE_DIR="$ac_define_dir" MODULE_DIR="$ac_define_dir"
@ -7465,9 +7501,15 @@ fi
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo $pkgrundir` last_ac_define_dir=`eval echo $pkgrundir`
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
ac_define_dir_counter=0
while test "x$last_ac_define_dir" != "x$ac_define_dir"; do while test "x$last_ac_define_dir" != "x$ac_define_dir"; do
last_ac_define_dir="$ac_define_dir" last_ac_define_dir="$ac_define_dir"
ac_define_dir=`eval echo $last_ac_define_dir` ac_define_dir=`eval echo $last_ac_define_dir`
as_fn_arith $ac_define_dir_counter + 1 && ac_define_dir_counter=$as_val
if test "x$ac_define_dir_counter" = x128; then :
as_fn_error $? "detected recusive directory expansion when expanding PKGRUNDIR=$pkgrundir: $ac_define_dir" "$LINENO" 5
break
fi
done done
PKGRUNDIR="$ac_define_dir" PKGRUNDIR="$ac_define_dir"

View File

@ -4,9 +4,14 @@ AC_DEFUN([AC_DEFINE_DIR], [
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo [$]$2` last_ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]last_ac_define_dir` ac_define_dir=`eval echo [$]last_ac_define_dir`
ac_define_dir_counter=0
while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do
last_ac_define_dir="[$]ac_define_dir" last_ac_define_dir="[$]ac_define_dir"
ac_define_dir=`eval echo [$]last_ac_define_dir` ac_define_dir=`eval echo [$]last_ac_define_dir`
AS_VAR_ARITH([ac_define_dir_counter], [$ac_define_dir_counter + 1])
AS_VAR_IF([ac_define_dir_counter], [128],
[AC_MSG_ERROR([detected recusive directory expansion when expanding $1=[$]$2: [$]ac_define_dir])
break])
done done
$1="$ac_define_dir" $1="$ac_define_dir"
AC_SUBST($1) AC_SUBST($1)