aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure414
1 files changed, 414 insertions, 0 deletions
diff --git a/gdb/configure b/gdb/configure
index 8ae2e09..f856cc4 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -658,6 +658,9 @@ TARGET_SYSTEM_ROOT
CONFIG_LDFLAGS
RDYNAMIC
ALLOCA
+GUILE_LIBS
+GUILE_CPPFLAGS
+pkg_config_prog_path
PYTHON_LIBS
PYTHON_CPPFLAGS
PYTHON_CFLAGS
@@ -813,6 +816,7 @@ with_gnu_ld
enable_rpath
with_libexpat_prefix
with_python
+with_guile
enable_libmcheck
with_included_regex
with_sysroot
@@ -1530,6 +1534,8 @@ Optional Packages:
--without-libexpat-prefix don't search for libexpat in includedir and libdir
--with-python[=PYTHON] include python support
(auto/yes/no/<python-program>)
+ --with-guile[=GUILE] include guile support
+ (auto/yes/no/<guile-version>/<pkg-config-program>)
--without-included-regex
don't use included regex; this is the default on
systems with version 2 of the GNU C library (use
@@ -8681,6 +8687,414 @@ fi
+# -------------------- #
+# Check for libguile. #
+# -------------------- #
+
+
+# Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_pkg_config_prog_path+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $pkg_config_prog_path in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
+ ;;
+esac
+fi
+pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
+if test -n "$pkg_config_prog_path"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
+$as_echo "$pkg_config_prog_path" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+
+
+# Check whether --with-guile was given.
+if test "${with_guile+set}" = set; then :
+ withval=$with_guile;
+else
+ with_guile=auto
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
+$as_echo_n "checking whether to use guile... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
+$as_echo "$with_guile" >&6; }
+
+try_guile_versions="guile-2.0"
+have_libguile=no
+case "${with_guile}" in
+no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
+$as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
+ ;;
+auto)
+
+ pkg_config=${pkg_config_prog_path}
+ guile_version_list=${try_guile_versions}
+ flag_errors=no
+
+ if test "${pkg_config}" = "missing"; then
+ as_fn_error "pkg-config program not found" "$LINENO" 5
+ fi
+ if test ! -f "${pkg_config}"; then
+ as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5
+ fi
+ found_usable_guile=checking
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
+$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
+ for guile_version in ${guile_version_list}; do
+ ${pkg_config} --exists ${guile_version} 2>/dev/null
+ if test $? != 0; then
+ continue
+ fi
+ new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
+ fi
+ new_LIBS=`${pkg_config} --libs ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
+ fi
+ found_usable_guile=${guile_version}
+ break
+ done
+ if test "${found_usable_guile}" = "checking"; then
+ if test "${flag_errors}" = "yes"; then
+ as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
+ else
+ found_usable_guile=no
+ fi
+ fi
+ if test "${found_usable_guile}" != no; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+ LIBS="$LIBS $new_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "libguile.h"
+int
+main ()
+{
+scm_init_guile ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_libguile=yes
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
+else
+ found_usable_guile=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CPPFLAGS=$save_CPPFLAGS
+ LIBS=$save_LIBS
+ if test "${found_usable_guile}" = no; then
+ if test "${flag_errors}" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "linking guile version ${guile_version} test program failed
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
+$as_echo "${found_usable_guile}" >&6; }
+
+ ;;
+yes)
+
+ pkg_config=${pkg_config_prog_path}
+ guile_version_list=${try_guile_versions}
+ flag_errors=yes
+
+ if test "${pkg_config}" = "missing"; then
+ as_fn_error "pkg-config program not found" "$LINENO" 5
+ fi
+ if test ! -f "${pkg_config}"; then
+ as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5
+ fi
+ found_usable_guile=checking
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
+$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
+ for guile_version in ${guile_version_list}; do
+ ${pkg_config} --exists ${guile_version} 2>/dev/null
+ if test $? != 0; then
+ continue
+ fi
+ new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
+ fi
+ new_LIBS=`${pkg_config} --libs ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
+ fi
+ found_usable_guile=${guile_version}
+ break
+ done
+ if test "${found_usable_guile}" = "checking"; then
+ if test "${flag_errors}" = "yes"; then
+ as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
+ else
+ found_usable_guile=no
+ fi
+ fi
+ if test "${found_usable_guile}" != no; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+ LIBS="$LIBS $new_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "libguile.h"
+int
+main ()
+{
+scm_init_guile ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_libguile=yes
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
+else
+ found_usable_guile=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CPPFLAGS=$save_CPPFLAGS
+ LIBS=$save_LIBS
+ if test "${found_usable_guile}" = no; then
+ if test "${flag_errors}" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "linking guile version ${guile_version} test program failed
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
+$as_echo "${found_usable_guile}" >&6; }
+
+ ;;
+[\\/]* | ?:[\\/]*)
+
+ pkg_config=${with_guile}
+ guile_version_list=${try_guile_versions}
+ flag_errors=yes
+
+ if test "${pkg_config}" = "missing"; then
+ as_fn_error "pkg-config program not found" "$LINENO" 5
+ fi
+ if test ! -f "${pkg_config}"; then
+ as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5
+ fi
+ found_usable_guile=checking
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
+$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
+ for guile_version in ${guile_version_list}; do
+ ${pkg_config} --exists ${guile_version} 2>/dev/null
+ if test $? != 0; then
+ continue
+ fi
+ new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
+ fi
+ new_LIBS=`${pkg_config} --libs ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
+ fi
+ found_usable_guile=${guile_version}
+ break
+ done
+ if test "${found_usable_guile}" = "checking"; then
+ if test "${flag_errors}" = "yes"; then
+ as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
+ else
+ found_usable_guile=no
+ fi
+ fi
+ if test "${found_usable_guile}" != no; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+ LIBS="$LIBS $new_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "libguile.h"
+int
+main ()
+{
+scm_init_guile ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_libguile=yes
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
+else
+ found_usable_guile=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CPPFLAGS=$save_CPPFLAGS
+ LIBS=$save_LIBS
+ if test "${found_usable_guile}" = no; then
+ if test "${flag_errors}" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "linking guile version ${guile_version} test program failed
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
+$as_echo "${found_usable_guile}" >&6; }
+
+ ;;
+"" | */*)
+ # Disallow --with=guile="" and --with-guile=foo/bar.
+ as_fn_error "invalid value for --with-guile" "$LINENO" 5
+ ;;
+*)
+ # A space separate list of guile versions to try, in order.
+
+ pkg_config=${pkg_config_prog_path}
+ guile_version_list=${with_guile}
+ flag_errors=yes
+
+ if test "${pkg_config}" = "missing"; then
+ as_fn_error "pkg-config program not found" "$LINENO" 5
+ fi
+ if test ! -f "${pkg_config}"; then
+ as_fn_error "pkg-config program ${pkg_config} not found" "$LINENO" 5
+ fi
+ found_usable_guile=checking
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
+$as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
+ for guile_version in ${guile_version_list}; do
+ ${pkg_config} --exists ${guile_version} 2>/dev/null
+ if test $? != 0; then
+ continue
+ fi
+ new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
+ fi
+ new_LIBS=`${pkg_config} --libs ${guile_version}`
+ if test $? != 0; then
+ as_fn_error "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
+ fi
+ found_usable_guile=${guile_version}
+ break
+ done
+ if test "${found_usable_guile}" = "checking"; then
+ if test "${flag_errors}" = "yes"; then
+ as_fn_error "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
+ else
+ found_usable_guile=no
+ fi
+ fi
+ if test "${found_usable_guile}" != no; then
+ save_CPPFLAGS=$CPPFLAGS
+ save_LIBS=$LIBS
+ CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
+ LIBS="$LIBS $new_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "libguile.h"
+int
+main ()
+{
+scm_init_guile ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ have_libguile=yes
+ GUILE_CPPFLAGS=$new_CPPFLAGS
+ GUILE_LIBS=$new_LIBS
+else
+ found_usable_guile=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ CPPFLAGS=$save_CPPFLAGS
+ LIBS=$save_LIBS
+ if test "${found_usable_guile}" = no; then
+ if test "${flag_errors}" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "linking guile version ${guile_version} test program failed
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
+$as_echo "${found_usable_guile}" >&6; }
+
+ ;;
+esac
+
+if test "${have_libguile}" != no; then
+
+$as_echo "#define HAVE_GUILE 1" >>confdefs.h
+
+ CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
+ CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
+ CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
+ CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
+ ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
+else
+ # Even if Guile support is not compiled in, we need to have these files
+ # included.
+ CONFIG_OBS="$CONFIG_OBS guile.o"
+ CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
+fi
+
+
+
# --------------------- #
# Check for libmcheck. #
# --------------------- #