+2013-04-17 Pedro Alves <palves@redhat.com>
+
+ * configure.ac (USE_THREAD_DB): Delete variable.
+ (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
+ Don't AC_SUBST USE_THREAD_DB.
+ * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
+ * config.in, configure: Regenerate.
+
2013-04-16 Pedro Alves <palves@redhat.com>
* linux-low.h (struct lwp_info) <thread_known>: Move under
INTERNAL_CFLAGS_BASE = ${CFLAGS} ${GLOBAL_CFLAGS} \
${PROFILE_CFLAGS} ${INCLUDE_CFLAGS}
INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS)
-INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) \
- @USE_THREAD_DB@ -DGDBSERVER
+INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER
# LDFLAGS is specifically reserved for setting from the command line
# when running make.
#endif
+/* Define if we should use libthread_db. */
+#undef USE_THREAD_DB
+
/* Define if we should use the Windows API, instead of the POSIX API. On
Windows, we use the Windows API when building for MinGW, but the POSIX API
when building for Cygwin. */
IPA_DEPFILES
srv_xmlfiles
srv_xmlbuiltin
-USE_THREAD_DB
GDBSERVER_LIBS
GDBSERVER_DEPFILES
RDYNAMIC
srv_thread_depfiles=
srv_libs=
-USE_THREAD_DB=
if test "$srv_linux_thread_db" = "yes"; then
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
fi
srv_thread_depfiles="thread-db.o proc-service.o"
- USE_THREAD_DB="-DUSE_THREAD_DB"
+
+$as_echo "#define USE_THREAD_DB 1" >>confdefs.h
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TD_VERSION" >&5
$as_echo_n "checking for TD_VERSION... " >&6; }
if test "${gdbsrv_cv_have_td_version+set}" = set; then :
-
GNULIB=build-gnulib-gdbserver/import
GNULIB_STDINT_H=
srv_thread_depfiles=
srv_libs=
-USE_THREAD_DB=
if test "$srv_linux_thread_db" = "yes"; then
if test "$ac_cv_lib_dl_dlopen" = "yes"; then
fi
srv_thread_depfiles="thread-db.o proc-service.o"
- USE_THREAD_DB="-DUSE_THREAD_DB"
+ AC_DEFINE(USE_THREAD_DB, 1, [Define if we should use libthread_db.])
AC_CACHE_CHECK([for TD_VERSION], gdbsrv_cv_have_td_version,
[AC_TRY_COMPILE([#include <thread_db.h>], [TD_VERSION;],
[gdbsrv_cv_have_td_version=yes],
AC_SUBST(GDBSERVER_DEPFILES)
AC_SUBST(GDBSERVER_LIBS)
-AC_SUBST(USE_THREAD_DB)
AC_SUBST(srv_xmlbuiltin)
AC_SUBST(srv_xmlfiles)
AC_SUBST(IPA_DEPFILES)