X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fconfigure.in;h=e8d6c3bcc8cce08e4dbee911d7e08b40278b43a4;hb=c5394b80aefdea6b2f589723a4b79bcbc1942629;hp=ba70e75522e75f56b63957dee144433ba3d3dead;hpb=ed288bb597072176e84fc8279707a3f2f475779b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/configure.in b/gdb/configure.in index ba70e75522..e8d6c3bcc8 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -79,19 +79,41 @@ AC_TYPE_SIGNAL AC_HEADER_STDC -AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h \ +AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h thread_db.h proc_service.h \ memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ - string.h sys/procfs.h sys/ptrace.h sys/reg.h \ + string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ term.h termio.h termios.h unistd.h wait.h sys/wait.h \ - wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h) + wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ + time.h sys/ioctl.h) AC_HEADER_STAT AC_C_CONST -AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll \ - socketpair) +AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask) AC_FUNC_ALLOCA +dnl See if ptrace.h provides the PTRACE_GETXFPREGS request. +dnl PTRACE_GETXFPREGS is a Cygnus invention, since we wrote our own +dnl Linux kernel patch for SSE support. That patch may or may not +dnl actually make it into the official distribution. If you find that +dnl years have gone by since this configure test was added, and Linux +dnl isn't using PTRACE_GETXFPREGS, that means that our patch didn't +dnl make it, and you can delete this code. +AC_MSG_CHECKING(for PTRACE_GETXFPREGS) +AC_CACHE_VAL(gdb_cv_have_ptrace_getxfpregs, +[AC_TRY_COMPILE([#include ], + [PTRACE_GETXFPREGS;], + [gdb_cv_have_ptrace_getxfpregs=yes], + [gdb_cv_have_ptrace_getxfpregs=no])]) +AC_MSG_RESULT($gdb_cv_have_ptrace_getxfpregs) +if test $gdb_cv_have_ptrace_getxfpregs = yes; then + AC_DEFINE(HAVE_PTRACE_GETXFPREGS) +fi + +AC_CHECK_LIB(socket, socketpair) +AC_CHECK_FUNCS(socketpair) + + BFD_NEED_DECLARATION(malloc) BFD_NEED_DECLARATION(realloc) BFD_NEED_DECLARATION(free) @@ -122,33 +144,24 @@ AC_MSG_RESULT($gdb_cv_hpux_sswide) # If we are configured native on GNU/Linux, work around problems with # sys/procfs.h -# Also detect which type of /proc is in use, such as for Unixware. +# Also detect which type of /proc is in use, such as for Unixware or Solaris. if test "${target}" = "${host}"; then - gdb_cv_hostos_is_solaris=no case "${host}" in i[[3456]]86-*-linux*) AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2) AC_DEFINE(sys_quotactl) ;; - *-*-solaris*) - gdb_cv_hostos_is_solaris=yes ;; + *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) + AC_DEFINE(NEW_PROC_API) + ;; + # FIXME: we would like to define NEW_PROC_API for all versions of + # Solaris from 2.6 on... but it isn't quite working yet. Seems + # to work on sparc 2.6, so let's try it out there. + sparc-sun-solaris2.6) + AC_DEFINE(NEW_PROC_API) + ;; esac - AC_MSG_CHECKING(for directory proc entries) -# The [gdb_host != sun4sol2] hack is because Solaris does provide the -# multiple procfs files as of Solaris 2.6, but GDB can't use it right now. - if test "$ac_cv_header_sys_procfs_h" = yes -a \ - "$gdb_cv_hostos_is_solaris" = no \ - -a -d /proc/$$ \ - -a -f /proc/$$/ctl \ - -a -f /proc/$$/as \ - -a -f /proc/$$/map \ - -a -f /proc/$$/status; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_MULTIPLE_PROC_FDS) - else - AC_MSG_RESULT(no) - fi fi if test "$ac_cv_header_sys_procfs_h" = yes; then @@ -395,15 +408,26 @@ case "${enableval}" in *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` build_warnings="${t} ${build_warnings}";; *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; -esac],[build_warnings=""])dnl - +esac +if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then + echo "Setting warning flags = $build_warnings" 6>&1 +fi +WARN_CFLAGS="" +WERROR_CFLAGS="" if test "x${build_warnings}" != x -a "x$GCC" = xyes then - WARN_CFLAGS="${build_warnings}" -else - WARN_CFLAGS="" -fi + # Separate out the -Werror flag as some files just cannot be + # compiled with it enabled. + for w in ${build_warnings}; do + case $w in + -Werr*) WERROR_CFLAGS=-Werror ;; + *) WARN_CFLAGS="${WARN_CFLAGS} $w" + esac + done +fi],[build_warnings=""])dnl + AC_SUBST(WARN_CFLAGS) +AC_SUBST(WERROR_CFLAGS) MMALLOC_CFLAGS= MMALLOC= @@ -465,6 +489,10 @@ AC_SUBST(TERM_LIB) WIN32LIBS= if test x$gdb_cv_os_cygwin = xyes; then WIN32LIBS="-luser32" + case "${target}" in + *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" + ;; + esac fi AC_SUBST(WIN32LIBS) @@ -677,6 +705,7 @@ sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, mv -f Makefile.tmp Makefile changequote([,])dnl + case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;;