aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-07-26 18:16:27 -0700
committerDoug Evans <xdje42@gmail.com>2014-07-26 18:16:27 -0700
commite76c5d173bbf7137555919dd136004a7c0118af7 (patch)
tree92e8106c379879427bb0ce570c3d0dece75dc020 /gdb/configure
parentPR guile/17146 preparatory work. (diff)
downloadbinutils-gdb-e76c5d173bbf7137555919dd136004a7c0118af7.tar.gz
binutils-gdb-e76c5d173bbf7137555919dd136004a7c0118af7.tar.bz2
binutils-gdb-e76c5d173bbf7137555919dd136004a7c0118af7.zip
PR guile/17146
* acinclude.m4 (GDB_GUILE_PROGRAM_NAMES): New macro. (GDB_GUILD_TARGET_FLAG, GDB_TRY_GUILD): New macros. * configure.ac: Try to use guild to compile an scm file, if it fails then disable guile support. * configure: Regenerate. * data-directory/Makefile.in (GUILE_SOURCE_FILES): Renamed from GUILE_FILE_LIST. (GUILE_COMPILED_FILES): New variable. (GUILE_FILES) Update. (GUILD, GUILD_TARGET_FLAG, GUILD_COMPILE_FLAGS): New variables. (stamp-guile): Compile scm files. * guile/guile.c (boot_guile_support): New function. (standard_throw_args_p): New function. (print_standard_throw_error, print_throw_error): New functions. (handle_boot_error): New function. (initialize_scheme_side): Rewrite to call boot_guile_support. * guile/lib/gdb/boot.scm: Update %load-compiled-path. Load gdb.go. * guile/lib/gdb/init.scm (%silence-compiler-warnings%): New function.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure64
1 files changed, 64 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index 98f653a9e3f..809326a4939 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -662,6 +662,8 @@ HAVE_GUILE_FALSE
HAVE_GUILE_TRUE
GUILE_LIBS
GUILE_CPPFLAGS
+GUILD_TARGET_FLAG
+GUILD
pkg_config_prog_path
HAVE_PYTHON_FALSE
HAVE_PYTHON_TRUE
@@ -9081,6 +9083,68 @@ esac
if test "${have_libguile}" != no; then
+ { $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`"
+
+ # 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`"
+ 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"
+
+
+
+
+ if test "$cross_compiling" = no; then
+ GUILD_TARGET_FLAG=
+ else
+ GUILD_TARGET_FLAG="--target=$host"
+ fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
+$as_echo_n "checking whether guild supports this host... " >&6; }
+if test "${ac_cv_guild_ok+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
+ if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
+ ac_cv_guild_ok=yes
+ else
+ ac_cv_guild_ok=no
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
+$as_echo "$ac_cv_guild_ok" >&6; }
+
+ if test "$ac_cv_guild_ok" = no; then
+ have_libguile=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
+$as_echo "$as_me: WARNING: disabling guile support" >&2;}
+ fi
+fi
+
+if test "${have_libguile}" != no; then
+
$as_echo "#define HAVE_GUILE 1" >>confdefs.h
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"