From d92419e5e96545b7021e28c14db0576ad0b1790b Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 29 Nov 2002 00:30:06 +0000 Subject: * configure.in: Check that the pthdebug library is recent enough before enabling thread support on native AiX. * configure: Regenerate. * config/powerpc/aix432.mh (NATDEPFILES): Remove aix-thread.o from the list of object files as it is now appended by configure if thread support is enabled. (NAT_CLIBS): Removed as -lpthdebug is also appended by configure if thread support is enabled. --- gdb/configure.in | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'gdb/configure.in') diff --git a/gdb/configure.in b/gdb/configure.in index d47ebd1..f91503a 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -532,12 +532,12 @@ aix*) ;; esac -dnl See if thread_db library is around for Solaris thread debugging. Note that -dnl we must explicitly test for version 1 of the library because version 0 -dnl (present on Solaris 2.4 or earlier) doesn't have the same API. -dnl Note that we only want this if we are both native (host == target), and -dnl not doing a canadian cross build (build == host). +dnl For certain native configurations, we need to check whether thread +dnl support can be built in or not. +dnl +dnl Note that we only want this if we are both native (host == target), +dnl and not doing a canadian cross build (build == host). if test ${build} = ${host} -a ${host} = ${target} ; then case ${host_os} in @@ -557,6 +557,10 @@ if test ${build} = ${host} -a ${host} = ${target} ; then fi ;; solaris*) + # See if thread_db library is around for Solaris thread debugging. + # Note that we must explicitly test for version 1 of the library + # because version 0 (present on Solaris 2.4 or earlier) doesn't have + # the same API. AC_MSG_CHECKING(for Solaris thread debugging library) if test -f /usr/lib/libthread_db.so.1 ; then AC_MSG_RESULT(yes) @@ -596,6 +600,22 @@ if test ${build} = ${host} -a ${host} = ${target} ; then AC_MSG_RESULT(no) fi ;; + aix*) + AC_MSG_CHECKING(for AiX thread debugging library) + AC_CACHE_VAL(gdb_cv_have_aix_thread_debug, + [AC_TRY_COMPILE([#include ], + [#ifndef PTHDB_VERSION_3 + #error + #endif], + gdb_cv_have_aix_thread_debug=yes, + gdb_cv_have_aix_thread_debug=no)]) + AC_MSG_RESULT($gdb_cv_have_aix_thread_debug) + if test $gdb_cv_have_aix_thread_debug = yes; then + CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" + CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o" + CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug" + fi + ;; esac AC_SUBST(CONFIG_LDFLAGS) fi -- cgit v1.1