Sanitize out v850 stuff.
[deliverable/binutils-gdb.git] / gdb / configure.in
index ac6c8abdc5bbae573b6d2a2e5afa6423672c8849..7e22e81689610e65658813329c428e63f75e6eae 100644 (file)
@@ -28,6 +28,8 @@ AC_AIX
 AC_MINIX
 AC_ISC_POSIX
 
+AC_CANONICAL_SYSTEM
+
 AC_PROG_INSTALL
 AC_CHECK_TOOL(AR, ar)
 AC_CHECK_TOOL(RANLIB, ranlib, :)
@@ -35,7 +37,6 @@ AC_PROG_YACC
 AC_PROG_AWK
 
 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
-AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 
 AC_HEADER_STDC
@@ -46,6 +47,16 @@ AC_C_CONST
 
 AC_CHECK_FUNCS(setpgid sbrk)
 
+# If we are configured native on Linux, work around problems with sys/procfs.h
+if test "${target}" = "${host}"; then
+  case "${host}" in
+  i[3456]86-*-linux*)
+       AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,"2")
+       AC_DEFINE(sys_quotactl)
+       ;;
+  esac
+fi
+
 AC_MSG_CHECKING([for gregset_t type])
 AC_CACHE_VAL(gdb_cv_have_gregset_t,
 [AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
@@ -207,7 +218,7 @@ AC_ARG_ENABLE(gdbtk,
        *go32*)
            AC_MSG_WARN([GDB does not support GDBtk on host ${host}.  GDBtk will be disabled.])
            enable_gdbtk=no ;;
-       *cygwin32*)
+       *cygwin32* | *windows*)
            AC_MSG_WARN([GDB does not support GDBtk on host ${host}.  GDBtk will be disabled.])
            enable_gdbtk=no ;;
        *)
@@ -221,9 +232,7 @@ esac],
 [
 # Default is on for everything but go32 and cygwin32
 case "$host" in
-    *go32*)
-       ;;
-    *cygwin32*)
+    *go32* | *cygwin32* | *windows*)
        ;;
     *)
        enable_gdbtk=yes ;;
@@ -233,24 +242,26 @@ case "$host" in
 if test "${enable_gdbtk}" = "yes"; then
 
     CY_AC_PATH_TCLCONFIG
-    CY_AC_LOAD_TCLCONFIG
-    CY_AC_PATH_TKCONFIG
+    if test -z "${no_tcl}"; then
+       CY_AC_LOAD_TCLCONFIG
+       CY_AC_PATH_TKCONFIG
 
-    # If $no_tk is nonempty, then we can't do Tk, and there is no
-    # point to doing Tcl.
-    if test -z "${no_tk}"; then
-       CY_AC_LOAD_TKCONFIG
-       CY_AC_PATH_TCLH
-       CY_AC_PATH_TKH
+       # If $no_tk is nonempty, then we can't do Tk, and there is no
+       # point to doing Tcl.
+       if test -z "${no_tk}"; then
+          CY_AC_LOAD_TKCONFIG
+          CY_AC_PATH_TCLH
+          CY_AC_PATH_TKH
 
-       # Include some libraries that Tcl and Tk want.
-       LIBS="$LIBS $TK_LIBS"
+          # Include some libraries that Tcl and Tk want.
+          LIBS="$LIBS $TK_LIBS"
 
-       ENABLE_GDBTK=1
+          ENABLE_GDBTK=1
 
-       TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
-       ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
-       ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
+          TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
+          ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
+          ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
+       fi
     fi
 fi
 
@@ -264,6 +275,65 @@ AC_SUBST(ENABLE_CFLAGS)
 AC_SUBST(ENABLE_CLIBS)
 AC_SUBST(ENABLE_OBS)
 
+# Begin stuff to support --enable-shared
+AC_ARG_ENABLE(shared,
+[  --enable-shared         use shared libraries],
+[case "${enableval}" in
+  yes) shared=true ;;
+  no)  shared=false ;;
+  *) shared=true ;;
+esac])dnl
+
+HLDFLAGS=
+HLDENV=
+# If we have shared libraries, try to set rpath reasonably.
+if test "${shared}" = "true"; then
+  case "${host}" in
+  *-*-hpux*)
+    HLDFLAGS='-Wl,+s,+b,$(libdir)'
+    ;;
+  *-*-irix5* | *-*-irix6*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-linux*aout*)
+    ;;
+  *-*-linux*)
+    HLDFLAGS='-Wl,-rpath,$(libdir)'
+    ;;
+  *-*-solaris*)
+    HLDFLAGS='-R $(libdir)'
+    ;;
+  *-*-sysv4*)
+    HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
+    ;;
+  esac
+fi
+
+# On SunOS, if the linker supports the -rpath option, use it to
+# prevent ../bfd and ../opcodes from being included in the run time
+# search path.
+case "${host}" in
+  *-*-sunos*)
+    echo 'main () { }' > conftest.c
+    ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
+    if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'No such file' conftest.t >/dev/null 2>&1; then
+      :
+    elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
+      :
+    elif test "${shared}" = "true"; then
+      HLDFLAGS='-Wl,-rpath=$(libdir)'
+    else
+      HLDFLAGS='-Wl,-rpath='
+    fi
+    rm -f conftest.t conftest.c conftest
+    ;;
+esac
+AC_SUBST(HLDFLAGS)
+AC_SUBST(HLDENV)
+# End stuff to support --enable-shared
+
 # target_subdir is used by the testsuite to find the target libraries.
 target_subdir=
 if test "${host}" != "${target}"; then
@@ -343,6 +413,8 @@ i[3456]86-*-sysv*)  gdb_host=i386v ;;
 i[3456]86-*-isc*)      gdb_host=i386v32 ;;
 i[3456]86-*-os9k)      gdb_host=i386os9k ;;
 i[3456]86-*-cygwin32)  gdb_host=cygwin32 ;;
+i[3456]86-*-windows)   gdb_host=windows
+                       configdirs="${configdirs} mswin" ;;
 m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
 m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
 m68030-sony-*)         gdb_host=news1000 ;;
@@ -573,6 +645,8 @@ mips64*vr4300*el-*-elf*)    gdb_target=vr4300el ;;
 mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
 mips64*vr4100*el-*-elf*)       gdb_target=vr4300el ;;
 mips64*vr4100*-*-elf*) gdb_target=vr4300 ;;
+mips64*vr5000*el-*-elf*)       gdb_target=vr4300el ;;
+mips64*vr5000*-*-elf*) gdb_target=vr4300 ;;
 mips64*el-*-elf*)      gdb_target=embedl64 ;;
 mips64*-*-elf*)                gdb_target=embed64 ;;
 mips*el-*-ecoff*)      gdb_target=embedl ;;
@@ -654,6 +728,10 @@ tahoe-*-*)         gdb_target=tahoe ;;
 
 vax-*-*)               gdb_target=vax ;;
 
+start-sanitize-v850
+v850-*-*)              gdb_target=v850 ;;
+
+end-sanitize-v850
 w65-*-*)               gdb_target=w65 ;;
 
 z8k-*-coff*)           gdb_target=z8k ;;
@@ -747,7 +825,7 @@ dnl Autoconf doesn't provide a mechanism for modifying definitions
 dnl provided by makefile fragments.
 dnl
 if test "${nativefile}" = ""; then
-sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
+sed -e '/^NATDEPFILES[[        ]]*=[[  ]]*/s//# NATDEPFILES=/' \
        < Makefile > Makefile.tem
 mv -f Makefile.tem Makefile
 fi
This page took 0.025698 seconds and 4 git commands to generate.