]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/configure.in
import gdb-1999-12-06 snapshot
[thirdparty/binutils-gdb.git] / gdb / configure.in
index 363438a033c8a7f8abd81b4e5174f3aae73b91ff..3dae4a3070c6b5973106fd658a525c2e4f2208b3 100644 (file)
@@ -44,6 +44,19 @@ CONFIG_SRCS=
 
 configdirs="doc testsuite"
 
+AC_ARG_ENABLE(multi-ice,
+[  --enable-multi-ice            Build the multi-ice-gdb-server],
+[case "${enableval}" in
+    yes ) enable_multi_ice="yes" ;;
+    no)  enable_multi_ice="no" ;;
+    *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;;
+  esac
+])
+
+if test "${enable_multi_ice}" = "yes"; then
+  configdirs="${configdirs} multi-ice"
+fi
+
 dnl
 changequote(,)dnl
 
@@ -70,19 +83,43 @@ AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h \
        memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
        string.h sys/procfs.h sys/ptrace.h sys/reg.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)
+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 <sys/ptrace.h>],
+               [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)
 BFD_NEED_DECLARATION(strerror)
 BFD_NEED_DECLARATION(strdup)
+BFD_NEED_DECLARATION(strstr)
 
 
 # The following save_state_t checkery is only necessary for HPUX 
@@ -380,15 +417,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=
@@ -424,6 +472,9 @@ AC_SUBST(DLLTOOL)
 AC_SUBST(WINDRES)
 
 dnl Figure out which term library to use.
+if test x$gdb_host = xgo32; then
+  TERM_LIB=
+else
 if test x$gdb_cv_os_cygwin = xyes; then
   TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
 else
@@ -440,9 +491,15 @@ else
     AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!)
   fi
 fi
+fi
 AC_SUBST(TERM_LIB)
 
-
+# libreadline needs libuser32.a in a cygwin environment
+WIN32LIBS=
+if test x$gdb_cv_os_cygwin = xyes; then
+    WIN32LIBS="-luser32"
+fi
+AC_SUBST(WIN32LIBS)
 
 
 AC_PATH_X
@@ -594,6 +651,13 @@ s/NAT_FILE[        ]*=[    ]*\([^  ]*\)/\1/p
 fi
 changequote([,])
 
+SUBDIRS="doc testsuite nlm"
+if test "${enable_multi_ice}" = "yes"; then
+  SUBDIRS="${SUBDIRS} multi-ice"
+fi
+
+AC_SUBST(SUBDIRS)
+
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
 # corresponding links.  But we have to remove the xm.h files and tm.h
@@ -646,6 +710,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 ;;