# Change to valid 8.3 filenames.
s/jm-winsz\([12]\)\.m4/jm\1-winsz.m4/g
s/NN-strne-\([12]\)/NN\1-strne/g
s/N-strne-\([12]\)/N\1-strne/g
s/NN-streq-\([12]\)/NN\1q-stre/g
s/N-streq-\([12]\)/N\1q-stre/g
s/date2sec-/d2sec-/g
s/Makefile\.am\.in/Makefile.am-in/g
s/\.env-warn/_env-warn/g
s/Makefile\.in\.in/Makefile.in-in/g
s/config\.h\.in/config.h-in/g
s/\.su-\$\$\$\$/_su-$$$$/g
s/relative-\([12]\).X/relat-\1.X/g

# Modifications to allow su to install without hassles.
s/\(chmod .*\$(installed_su)\)/\1.exe/g
s/\(chown .*\$(installed_su)\)/\1.exe/g

# Change ':' in environment to ';'
/TESTS_ENVIRONMENT *=/,/^EOF/ {
	s/PATH=\(.*\):\$\$PATH \\/PATH="\1;$$PATH" \\/g
	s/PATH=\(.*\):\$\$PATH/PATH="\1;$$PATH"/g
}
s/TEXINPUTS=\(.*\):\$\$TEXINPUTS \\/TEXINPUTS="\1;$$TEXINPUTS" \\/g

# Remove ../ and ../../ at the beginning of these values.
s/srcdir *= *\.\.\/\(\.\.\/\)*\([a-zA-Z]:\)/srcdir = \2/
s/top_srcdir *= *\.\.\/\(\.\.\/\)*\([a-zA-Z]:\)/top_srcdir = \2/
s/VPATH *= *\.\.\/\(\.\.\/\)*\([a-zA-Z]:\)/VPATH = \2/

# Remove stty from the set of binary programs.
/^ *bin_PROGRAMS *=/,/stty/ {
	s/ *stty//
}

# Prevent running of test-suite in "src".
s/^\( *bin_SCRIPTS *=\).*/\1 /

# Change .prev-version to _prev-version
s/\.prev-version/_prev-version/
