- 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)
- AC_DEFINE(HAVE_THREAD_DB_LIB, 1,
- [Define if using Solaris thread debugging.])
- CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
- CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
- AC_CHECK_LIB(dl, dlopen)
- CONFIG_LDFLAGS="${CONFIG_LDFLAGS} $RDYNAMIC"
- # Sun randomly tweaked the prototypes in <proc_service.h>
- # at one point.
- AC_MSG_CHECKING(if <proc_service.h> is old)
- AC_CACHE_VAL(gdb_cv_proc_service_is_old,[
- AC_TRY_COMPILE([
- #include <proc_service.h>
- ps_err_e ps_pdwrite
- (struct ps_prochandle*, psaddr_t, const void*, size_t);
- ],, gdb_cv_proc_service_is_old=no,
- gdb_cv_proc_service_is_old=yes)
- ])
- AC_MSG_RESULT($gdb_cv_proc_service_is_old)
- if test $gdb_cv_proc_service_is_old = yes; then
- AC_DEFINE(PROC_SERVICE_IS_OLD, 1,
- [Define if <proc_service.h> on solaris uses int instead of
- size_t, and assorted other type changes.])
- fi
- else
- AC_MSG_RESULT(no)
- fi
- ;;