TARGET_SYSTEM_ROOT_DEFINE
TARGET_SYSTEM_ROOT
CONFIG_LDFLAGS
+RDYNAMIC
ALLOCA
PYTHON_CFLAGS
python_prog_path
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
--without-libexpat-prefix don't search for libexpat in includedir and libdir
- --with-python include python support (auto/yes/no/<path>)
+ --with-python[=PYTHON] include python support
+ (auto/yes/no/<python-program>)
--without-included-regex
don't use included regex; this is the default on
systems with version 2 of the GNU C library (use
+
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
+
# GDB's datadir relocation
+
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
+
# Check whether --with-relocated-sources was given.
if test "${with_relocated_sources+set}" = set; then :
withval=$with_relocated_sources; reloc_srcdir="${withval}"
+
# Check whether --with-python was given.
if test "${with_python+set}" = set; then :
withval=$with_python;
$as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
have_libpython=no
else
- have_python_config=no
case "${with_python}" in
/*)
if test -d ${with_python}; then
# Assume the python binary is ${with_python}/bin/python.
- python_prefix=${with_python}
python_prog="${with_python}/bin/python"
+ python_prefix=
if test ! -x ${python_prog}; then
# Fall back to gdb 7.0/7.1 behaviour.
python_prog=missing
+ python_prefix=${with_python}
fi
elif test -x ${with_python}; then
# While we can't run python compiled for $host (unless host == build),
# the user could write a script that provides the needed information,
# so we support that.
- python_prefix=
python_prog=${with_python}
+ python_prefix=
else
as_fn_error "invalid value for --with-python" "$LINENO" 5
fi
if test $? != 0; then
as_fn_error "failure running python-config --ldflags" "$LINENO" 5
fi
+ python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
+ if test $? != 0; then
+ as_fn_error "failure running python-config --exec-prefix" "$LINENO" 5
+ fi
have_python_config=yes
else
# Fall back to gdb 7.0/7.1 behaviour.
python_includes="-I${python_prefix}/include"
python_libs="-L${python_prefix}/lib"
fi
+ have_python_config=no
fi
# Having "/pythonX.Y" in the include path is awkward.
# path of the, umm, include file. So strip away this part of the
# output of python-config --includes.
python_includes=`echo "${python_includes} " \
- | sed -e 's,/python[0-9]*[.][0-9]* , ,g'`
+ | sed -e 's,/python[0-9]*[.][0-9]* , ,g'`
# If we have python-config, only try the configuration it provides.
# Otherwise fallback on the old way of trying different versions of
have_libpython=no
if test "${have_python_config}" = yes; then
python_version=`echo " ${python_libs} " \
- | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'`
- if test "${python_version}" != ""; then
+ | sed -e 's,^.* -l\(python[0-9]*[.][0-9]*\) .*$,\1,'`
+ case "${python_version}" in
+ python*)
version=${python_version}
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
$as_echo "${found_usable_python}" >&6; }
- else
+ ;;
+ *)
as_fn_error "unable to determine python version from ${python_libs}" "$LINENO" 5
- fi
+ ;;
+ esac
else
if test "${have_libpython}" = no; then
as_fn_error "no usable python found at ${with_python}" "$LINENO" 5
;;
esac
+ else
+ if test -n "${python_prefix}"; then
+
+cat >>confdefs.h <<_ACEOF
+#define WITH_PYTHON_PATH "${python_prefix}"
+_ACEOF
+
+
+ if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ value=0
+ case ${python_prefix} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+ value=1
+ ;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define PYTHON_PATH_RELOCATABLE $value
+_ACEOF
+
+
+ fi
fi
fi
if test ${build} = ${host} -a ${host} = ${target} ; then
+ if test "$GCC" = "yes" ; then
+ # The dynamically loaded libthread_db needs access to symbols in the gdb
+ # executable. Older GNU ld supports --export-dynamic but --dynamic-list
+ # may not be supported there.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
+$as_echo_n "checking for the dynamic export flag... " >&6; }
+ old_LDFLAGS="$LDFLAGS"
+ # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
+ RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
+ LDFLAGS="$LDFLAGS $RDYNAMIC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ found="-Wl,--dynamic-list"
+ RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
+else
+ RDYNAMIC="-rdynamic"
+ LDFLAGS="$old_LDFLAGS $RDYNAMIC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ found="-rdynamic"
+else
+ found="no"
+ # Error on its usage by .mh file.
+ RDYNAMIC="no-rdynamic-available"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+ LDFLAGS="$old_LDFLAGS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
+$as_echo "$found" >&6; }
+ fi
+
case ${host_os} in
hpux*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HPUX/OSF thread support" >&5
fi
- if test "$GCC" = "yes" ; then
- # The GNU linker requires the -export-dynamic option to make
- # all symbols visible in the dynamic symbol table.
- hold_ldflags=$LDFLAGS
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the ld -export-dynamic flag" >&5
-$as_echo_n "checking for the ld -export-dynamic flag... " >&6; }
- LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-int i;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- found=yes
-else
- found=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$hold_ldflags
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
-$as_echo "$found" >&6; }
- if test $found = yes; then
- CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
- fi
- fi
+ CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
# Sun randomly tweaked the prototypes in <proc_service.h>
# at one point.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if <proc_service.h> is old" >&5
+
if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
+
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then :
enableval=$enable_werror; case "${enableval}" in