Browse Source

Add support for patching config.guess interpreter line with CONFIG_SHELL

dejagnu-1.6.3
Jacob Bachmeyer 5 years ago
parent
commit
c6d9e1e2b1
  1. 2
      ChangeLog
  2. 20
      configure.ac

2
ChangeLog

@ -2,6 +2,8 @@
* configure.ac: Change "dnl" comments that should appear in
configure to regular comments.
Add experimental support for propagating CONFIG_SHELL to the
config.sub and config.guess scripts in the source directory.
2021-04-01 Jacob Bachmeyer <jcb@gnu.org>

20
configure.ac

@ -42,5 +42,25 @@ fi
AC_SUBST(DEJAGNU)
# Makefile.am arranges for DEJAGNU to be exported in the environment.
# Patch interpreter lines in config.* scripts to reference CONFIG_SHELL.
# Normally configure ensures that these scripts are run using CONFIG_SHELL
# and their interpreter lines are ignored, but DejaGnu also installs
# config.guess and the framework invokes it at runtime.
if test x"$SHELL" != x/bin/sh
then
AC_CONFIG_COMMANDS([scriptpatch],[
for file in config.guess config.sub
do
f=${ac_srcdir}/${file}
sed -e '1s,^@%:@!.*$,@%:@! '"${SHELL}", $f > ${f}.new
if test `awk 'END {print NR}' $f` != `awk 'END {print NR}' ${f}.new`
then
AC_MSG_ERROR([patching script for local shell changed line count!])
fi
mv -f ${f}.new $f
done
], [SHELL=$SHELL])
fi
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

Loading…
Cancel
Save