[PATCH] Unbreak program transformation name `configure' options

Maciej W. Rozycki
2012-04-27T15:16:26Z

Hi,

This commit:

2012-04-19 Pedro Alves <palves@redhat.com>

gdb/
* configure.ac: Remove gl_EARLY, gl_INIT and AM_INIT_AUTOMAKE
calls. Configure gnulib using ACX_CONFIGURE_DIR.

removed the handling of the program transformation name `configure'
options in this subdirectory (that was pulled implicitly with
AM_INIT_AUTOMAKE).

OK to check in the following fix that reinstates it?

2012-04-26 Maciej W. Rozycki <macro@codesourcery.com>

gdb/
* configure.ac: Add AC_ARG_PROGRAM.
* configure: Regenerate.

Maciej

gdb-ac-fix.diff
Index: gdb-fsf-trunk-quilt/gdb/configure
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/configure 2012-04-26 18:06:36.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/configure 2012-04-27 06:52:28.075588943 +0100
@@ -1426,6 +1426,11 @@ _ACEOF

cat <<\_ACEOF

+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR
@@ -4371,6 +4376,16 @@ ac_configure="$SHELL $ac_aux_dir/configu

+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"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+

# Dependency checking.
rm -rf .tst 2>/dev/null
Index: gdb-fsf-trunk-quilt/gdb/configure.ac
===================================================================
--- gdb-fsf-trunk-quilt.orig/gdb/configure.ac 2012-04-26 18:06:36.000000000 +0100
+++ gdb-fsf-trunk-quilt/gdb/configure.ac 2012-04-27 06:51:40.705609266 +0100
@@ -30,6 +30,7 @@ AM_PROG_CC_STDC

AC_CONFIG_AUX_DIR(..)
AC_CANONICAL_SYSTEM
+AC_ARG_PROGRAM

# Dependency checking.
ZW_CREATE_DEPDIR