summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-09-09 22:06:35 -0700
committerDoug Evans <xdje42@gmail.com>2014-09-09 22:06:35 -0700
commit14075b38b1f43d03e0e35a04a7f5cdb5774ba5cf (patch)
treedf40e836e1cf579313ace8721299d04e5c10f271 /gdb
parent0df33300929f9b54ddcf040f9b1fe69c1a88304b (diff)
downloadbinutils-gdb-14075b38b1f43d03e0e35a04a7f5cdb5774ba5cf.tar.gz
PR guile/17367
gdb/ChangeLog: * acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): Pass guile version as last parameter to pkg-config, not first. * configure.ac: Pass --with-guile provided pkg-config path to GDB_GUILE_PROGRAM_NAMES. * configure: Regenerate.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/acinclude.m44
-rwxr-xr-xgdb/configure38
-rw-r--r--gdb/configure.ac14
4 files changed, 58 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cba1aa8c9de..a8374c7ca17 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2014-09-09 Doug Evans <xdje42@gmail.com>
+ PR guile/17367
+ * acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): Pass guile version as
+ last parameter to pkg-config, not first.
+ * configure.ac: Pass --with-guile provided pkg-config path to
+ GDB_GUILE_PROGRAM_NAMES.
+ * configure: Regenerate.
+
+2014-09-09 Doug Evans <xdje42@gmail.com>
+
PR 17247
* guile.c: #include <signal.h>.
(_initialize_guile): Block SIGCHLD while initializing Guile.
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index a3fb9e27ac6..45d73966d89 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -482,14 +482,14 @@ dnl similar to Guile's 'GUILE_PROGS' macro.)
AC_DEFUN([GDB_GUILE_PROGRAM_NAMES], [
AC_CACHE_CHECK([for the absolute file name of the 'guild' command],
[ac_cv_guild_program_name],
- [ac_cv_guild_program_name="`$1 $2 --variable guild`"
+ [ac_cv_guild_program_name="`$1 --variable guild $2`"
# In Guile up to 2.0.11 included, guile-2.0.pc would not define
# the 'guild' and 'bindir' variables. In that case, try to guess
# what the program name is, at the risk of getting it wrong if
# Guile was configured with '--program-suffix' or similar.
if test "x$ac_cv_guild_program_name" = "x"; then
- guile_exec_prefix="`$1 $2 --variable exec_prefix`"
+ guile_exec_prefix="`$1 --variable exec_prefix $2`"
ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
fi
])
diff --git a/gdb/configure b/gdb/configure
index 0d6194b0798..4b2906eb5bd 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -9082,20 +9082,22 @@ $as_echo "${found_usable_guile}" >&6; }
esac
if test "${have_libguile}" != no; then
+ case "${with_guile}" in
+ [\\/]* | ?:[\\/]*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
if test "${ac_cv_guild_program_name+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- ac_cv_guild_program_name="`"${pkg_config_prog_path}" "${guile_version}" --variable guild`"
+ ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
# In Guile up to 2.0.11 included, guile-2.0.pc would not define
# the 'guild' and 'bindir' variables. In that case, try to guess
# what the program name is, at the risk of getting it wrong if
# Guile was configured with '--program-suffix' or similar.
if test "x$ac_cv_guild_program_name" = "x"; then
- guile_exec_prefix="`"${pkg_config_prog_path}" "${guile_version}" --variable exec_prefix`"
+ guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
fi
@@ -9110,6 +9112,38 @@ $as_echo "$ac_cv_guild_program_name" >&6; }
GUILD="$ac_cv_guild_program_name"
+ ;;
+ *)
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
+$as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
+if test "${ac_cv_guild_program_name+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
+
+ # In Guile up to 2.0.11 included, guile-2.0.pc would not define
+ # the 'guild' and 'bindir' variables. In that case, try to guess
+ # what the program name is, at the risk of getting it wrong if
+ # Guile was configured with '--program-suffix' or similar.
+ if test "x$ac_cv_guild_program_name" = "x"; then
+ guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
+ ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
+$as_echo "$ac_cv_guild_program_name" >&6; }
+
+ if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
+ as_fn_error "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
+ fi
+
+ GUILD="$ac_cv_guild_program_name"
+
+
+ ;;
+ esac
if test "$cross_compiling" = no; then
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 36084fb50ac..c083e52cac9 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1143,8 +1143,9 @@ dnl It could be a shell script. It is invoked as:
dnl pkg-config --exists $version
dnl pkg-config --cflags $version
dnl pkg-config --libs $version
-dnl $version will be the default guile version (currently guile-2.0),
-dnl but the program is free to ignore this.
+dnl pkg-config --variable guild $version
+dnl The script will be called with $version having each value in
+dnl $try_guile_versions until --exists indicates success.
AC_ARG_WITH(guile,
AS_HELP_STRING([--with-guile@<:@=GUILE@:>@], [include guile support (auto/yes/no/<guile-version>/<pkg-config-program>)]),
@@ -1196,7 +1197,14 @@ esac
if test "${have_libguile}" != no; then
dnl Get the name of the 'guild' program.
- GDB_GUILE_PROGRAM_NAMES(["${pkg_config_prog_path}"], ["${guile_version}"])
+ case "${with_guile}" in
+ [[\\/]]* | ?:[[\\/]]*)
+ GDB_GUILE_PROGRAM_NAMES(["${with_guile}"], ["${guile_version}"])
+ ;;
+ *)
+ GDB_GUILE_PROGRAM_NAMES(["${pkg_config_prog_path}"], ["${guile_version}"])
+ ;;
+ esac
dnl Make sure guild can handle this host.
GDB_TRY_GUILD([$srcdir/guile/lib/gdb/support.scm])