This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
suffix and prefix support
- To: egcs-patches at cygnus dot com
- Subject: suffix and prefix support
- From: mrs at wrs dot com (Mike Stump)
- Date: Thu, 18 Jun 1998 23:13:07 -0700
These patches fix program_suffix and program_prefix support so they
work. The autoconf patches I think should and can go back to the
autoconf people.
1998-06-18 Mike Stump <mrs@wrs.com>
* aclocal.m4 (AC_ARG_PROGRAM_FIXED): Remove spaces in sed
commands.
* configure.in: Use AC_ARG_PROGRAM_FIXED.
Doing diffs in aclocal.m4.~1~:
*** aclocal.m4.~1~ Thu Jun 18 21:46:49 1998
--- aclocal.m4 Thu Jun 18 21:58:44 1998
*************** AC_SUBST(INSTALL_PROGRAM)dnl
*** 153,155 ****
--- 153,180 ----
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)dnl
])
+
+ dnl ### Transforming program names.
+
+ dnl AC_ARG_PROGRAM_FIXED()
+ AC_DEFUN(AC_ARG_PROGRAM_FIXED,
+ [if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+ else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+ s,\\,\\\\,g; s,\$,$$,g
+ EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+ fi
+ test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},;$program_transform_name"
+ # Use a double $ so make ignores it.
+ test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
+
+ # sed with no file args requires a program.
+ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+ ])
+
--------------
Doing diffs in configure.in.~1~:
*** configure.in.~1~ Thu Jun 18 21:37:49 1998
--- configure.in Thu Jun 18 21:58:19 1998
*************** esac
*** 126,131 ****
--- 126,134 ----
# Determine the host, build, and target systems
AC_CANONICAL_SYSTEM
+ # Program prefix and suffix
+ AC_ARG_PROGRAM_FIXED
+
# Find some useful tools
AC_PROG_AWK
AC_PROG_LEX
--------------