+
ac_config_headers="$ac_config_headers config.h:config.in"
$as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
enableval=$enable_largefile;
main ()
{
+
;
return 0;
}
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; };
+
$as_echo "#define HAVE_UST 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }; ustlibs= ; ustinc=
+$as_echo "no" >&6; }
+ ustlibs= ; ustinc=
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS="$saved_CFLAGS"
gdbsrv_cv_have_ptrace_getregs=yes
else
gdbsrv_cv_have_ptrace_getregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getregs" >&5
gdbsrv_cv_have_ptrace_getfpxregs=yes
else
gdbsrv_cv_have_ptrace_getfpxregs=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_ptrace_getfpxregs" >&5
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
found="-Wl,--dynamic-list"
- RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
+ RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
else
RDYNAMIC="-rdynamic"
- LDFLAGS="$old_LDFLAGS $RDYNAMIC"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LDFLAGS="$old_LDFLAGS $RDYNAMIC"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
found="-rdynamic"
else
found="no"
- RDYNAMIC=""
+ RDYNAMIC=""
+
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
gdbsrv_cv_have_td_version=yes
else
gdbsrv_cv_have_td_version=no
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_td_version" >&5
$as_echo "$gdbsrv_cv_have_td_version" >&6; }
if ${gdbsrv_cv_have_sync_builtins+:} false; then :
$as_echo_n "(cached) " >&6
else
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
-int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);
+int foo, bar;
+ bar = __sync_val_compare_and_swap(&foo, 0, 1);
+
;
return 0;
}
gdbsrv_cv_have_sync_builtins=yes
else
gdbsrv_cv_have_sync_builtins=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdbsrv_cv_have_sync_builtins" >&5
$as_echo "$gdbsrv_cv_have_sync_builtins" >&6; }
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(server.cc)
+AC_INIT
+AC_CONFIG_SRCDIR([server.cc])
AC_CONFIG_HEADERS(config.h:config.in, [echo > stamp-h])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CXX
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AM_PROG_INSTALL_STRIP
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ustinc"
AC_MSG_CHECKING([for ust])
- AC_TRY_COMPILE([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [
#define CONFIG_UST_GDB_INTEGRATION
#include <ust/ust.h>
- ],[],
- [AC_MSG_RESULT([yes]); AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
- [AC_MSG_RESULT([no]); ustlibs= ; ustinc= ])
+ ],
+ []
+ )],
+ [AC_MSG_RESULT([yes]);
+ AC_DEFINE(HAVE_UST, 1, [Define if UST is available])],
+ [AC_MSG_RESULT([no])
+ ustlibs= ; ustinc= ]
+ )
CFLAGS="$saved_CFLAGS"
fi
[Define if the target supports register sets.])
AC_MSG_CHECKING(for PTRACE_GETREGS)
- AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getregs,
- [AC_TRY_COMPILE([#include <sys/ptrace.h>],
- [PTRACE_GETREGS;],
- [gdbsrv_cv_have_ptrace_getregs=yes],
- [gdbsrv_cv_have_ptrace_getregs=no])])
+ AC_CACHE_VAL(
+ [gdbsrv_cv_have_ptrace_getregs],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETREGS;])],
+ [gdbsrv_cv_have_ptrace_getregs=yes],
+ [gdbsrv_cv_have_ptrace_getregs=no]
+ )]
+ )
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getregs)
if test "${gdbsrv_cv_have_ptrace_getregs}" = "yes"; then
AC_DEFINE(HAVE_PTRACE_GETREGS, 1,
fi
AC_MSG_CHECKING(for PTRACE_GETFPXREGS)
- AC_CACHE_VAL(gdbsrv_cv_have_ptrace_getfpxregs,
- [AC_TRY_COMPILE([#include <sys/ptrace.h>],
- [PTRACE_GETFPXREGS;],
- [gdbsrv_cv_have_ptrace_getfpxregs=yes],
- [gdbsrv_cv_have_ptrace_getfpxregs=no])])
+ AC_CACHE_VAL(
+ [gdbsrv_cv_have_ptrace_getfpxregs],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <sys/ptrace.h>], [PTRACE_GETFPXREGS;])],
+ [gdbsrv_cv_have_ptrace_getfpxregs=yes],
+ [gdbsrv_cv_have_ptrace_getfpxregs=no]
+ )]
+ )
AC_MSG_RESULT($gdbsrv_cv_have_ptrace_getfpxregs)
if test "${gdbsrv_cv_have_ptrace_getfpxregs}" = "yes"; then
AC_DEFINE(HAVE_PTRACE_GETFPXREGS, 1,
# supported there.
RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
LDFLAGS="$LDFLAGS $RDYNAMIC"
- AC_TRY_LINK([], [],
- [found="-Wl,--dynamic-list"
- RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
- [RDYNAMIC="-rdynamic"
- LDFLAGS="$old_LDFLAGS $RDYNAMIC"
- AC_TRY_LINK([], [],
- [found="-rdynamic"],
- [found="no"
- RDYNAMIC=""])])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([],[])],
+ [found="-Wl,--dynamic-list"
+ RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'],
+ [RDYNAMIC="-rdynamic"
+ LDFLAGS="$old_LDFLAGS $RDYNAMIC"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([], [])],
+ [found="-rdynamic"],
+ [found="no"
+ RDYNAMIC=""]
+ )]
+ )
AC_SUBST(RDYNAMIC)
LDFLAGS="$old_LDFLAGS"
AC_MSG_RESULT($found)
srv_thread_depfiles="thread-db.o proc-service.o"
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],
- [gdbsrv_cv_have_td_version=no])])
+ AC_CACHE_CHECK(
+ [for TD_VERSION],
+ [gdbsrv_cv_have_td_version],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([#include <thread_db.h>], [TD_VERSION;])],
+ [gdbsrv_cv_have_td_version=yes],
+ [gdbsrv_cv_have_td_version=no]
+ )]
+ )
if test "$gdbsrv_cv_have_td_version" = yes; then
AC_DEFINE(HAVE_TD_VERSION, 1, [Define if TD_VERSION is available.])
fi
GDBSERVER_LIBS="$srv_libs"
dnl Check whether the target supports __sync_*_compare_and_swap.
-AC_CACHE_CHECK([whether the target supports __sync_*_compare_and_swap],
- gdbsrv_cv_have_sync_builtins, [
-AC_TRY_LINK([], [int foo, bar; bar = __sync_val_compare_and_swap(&foo, 0, 1);],
- gdbsrv_cv_have_sync_builtins=yes,
- gdbsrv_cv_have_sync_builtins=no)])
+AC_CACHE_CHECK(
+ [whether the target supports __sync_*_compare_and_swap],
+ [gdbsrv_cv_have_sync_builtins],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [],
+ [int foo, bar;
+ bar = __sync_val_compare_and_swap(&foo, 0, 1);]
+ )],
+ [gdbsrv_cv_have_sync_builtins=yes],
+ [gdbsrv_cv_have_sync_builtins=no]
+ )]
+)
if test "$gdbsrv_cv_have_sync_builtins" = yes; then
AC_DEFINE(HAVE_SYNC_BUILTINS, 1,
[Define to 1 if the target supports __sync_*_compare_and_swap])