Autoconf versions before 2.60 don't have datarootdir defined, and so this
resulted in a @datarootdir@ --> @datarootdir@ infinite expansion.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+2006-11-12 Theodore Tso <tytso@mit.edu>
+
+ * subst.c (substitute_line): Avoid infinite loop caused by a
+ substition such as @datarootdir@ --> @datarootdir@. (This
+ was caused by autoconf versions before 2.60, which didn't
+ define the @datarootdir@ expansion.
+
2006-10-22 Theodore Tso <tytso@mit.edu>
* subst.conf.in: Add datarootdir definition for compatibility with
#endif
ptr = name_ptr-1;
replace_string(ptr, end_ptr, ent->value);
+ if ((ent->value[0] == '@') &&
+ (strlen(replace_name) == strlen(ent->value)-2) &&
+ !strncmp(replace_name, ent->value+1,
+ strlen(ent->value)-2))
+ /* avoid an infinite loop */
+ ptr += strlen(ent->value);
}
/*
* Now do a second pass to expand ${FOO}