ports last two commits to autofools
constify problem data functions