* sparc-tdep.c (SPARC_F0_REGNUM, SPARC_F1_REGNUM, SPARC_O0_REGNUM,
[deliverable/binutils-gdb.git] / gdb / configure.in
index f87eba5e34baad09cd197d4291139ef42cae698f..07aab351423ca3e2911c0c93d8d7f446309cc688 100644 (file)
@@ -38,7 +38,7 @@ AC_CANONICAL_SYSTEM
 # doesn't support cross-compilation, but the one from Autoconf 2.5x
 # does.  Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
 # deal with the lossage.  Note that CY_GNU_GETTEXT currently calls
-# AC_PROG_RANLIB.  This can be removed when we switch to Autoconf
+# AC_PROG_RANLIB.  This can be removed when we switch to Autoconf
 # 2.5x.
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 
@@ -47,6 +47,15 @@ ALL_LINGUAS=
 CY_GNU_GETTEXT
 AC_DEFINE(PACKAGE, "gdb", [Name of this package. ])
 
+debugdir=${libdir}/debug
+        
+AC_ARG_WITH(separate-debug-dir,
+[  --with-separate-debug-dir=path   Look for global separate debug info in this path [LIBDIR/debug]],
+[debugdir="${withval}"])
+       
+AC_DEFINE_DIR(DEBUGDIR, debugdir,
+              [Global directory for separate debug files. ])
+#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
 
 dnl List of object files added by configure.
 
@@ -164,7 +173,7 @@ fi
 
 # Enable gdbtk.
 AC_ARG_ENABLE(gdbtk,
-[  --enable-gtk            enable gdbtk graphical user interface (GUI)],
+[  --enable-gdbtk          enable gdbtk graphical user interface (GUI)],
   [case $enableval in
     yes | no)
       ;;
@@ -183,6 +192,47 @@ case $host_os in
     enable_gdbtk=no ;;
 esac
 
+# Profiling support.
+AC_ARG_ENABLE(profiling,
+[  --enable-profiling      enable profiling of GDB],
+  [case $enableval in
+    yes | no)
+      ;;
+    *)
+      AC_MSG_ERROR([bad value $enableval for --enable-profile]) ;;
+  esac],
+ [enable_profiling=no])
+
+AC_CHECK_FUNCS(monstartup _mcleanup)
+AC_CACHE_CHECK([for _etext], ac_cv_var__etext,
+[AC_TRY_LINK(
+[#include <stdlib.h>
+extern char _etext;
+],
+[free (&_etext);], ac_cv_var__etext=yes, ac_cv_var__etext=no)])
+if test $ac_cv_var__etext = yes; then
+  AC_DEFINE(HAVE__ETEXT, 1,
+            [Define to 1 if your system has the _etext variable. ])
+fi
+if test "$enable_profiling" = yes ; then
+  if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
+    AC_MSG_ERROR(--enable-profiling requires monstartup and _mcleanup)
+  fi
+  PROFILE_CFLAGS=-pg
+  OLD_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+
+  AC_CACHE_CHECK([whether $CC supports -pg], ac_cv_cc_supports_pg,
+    [AC_TRY_COMPILE([], [int x;], ac_cv_cc_supports_pg=yes,
+     ac_cv_cc_supports_pg=no)])
+
+  if test $ac_cv_cc_supports_pg = no; then
+    AC_MSG_ERROR(--enable-profiling requires a compiler which supports -pg)
+  fi
+
+  CFLAGS="$OLD_CFLAGS"
+fi
+
 # --------------------- #
 # Checks for programs.  #
 # --------------------- #
@@ -461,6 +511,18 @@ if test $gdb_cv_have_pt_getxmmregs = yes; then
   AC_DEFINE(HAVE_PT_GETXMMREGS)
 fi
 
+# See if stdint.h provides the uintptr_t type.
+# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
+AC_CACHE_CHECK([for uintptr_t in stdint.h], gdb_cv_have_uintptr_t,
+  [AC_TRY_COMPILE(
+    [#include <stdint.h>],
+    [uintptr_t foo = 0;],
+    gdb_cv_have_uintptr_t=yes,
+    gdb_cv_have_uintptr_t=no)])
+AC_MSG_RESULT($gdb_cv_have_uintptr_t)
+if test $gdb_cv_have_uintptr_t = yes; then
+  AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if <stdint.h> provides the uintptr_t type.])
+fi
 
 BFD_NEED_DECLARATION(malloc)
 BFD_NEED_DECLARATION(realloc)
@@ -851,6 +913,39 @@ fi
 
 dnl Handle optional features that can be enabled.
 
+AC_ARG_WITH(sysroot,
+[  --with-sysroot[=DIR] Search for usr/lib et al within DIR.],
+[
+ case ${with_sysroot} in
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+
+ if test "x$exec_prefix" = xNONE; then
+  if test "x$prefix" = xNONE; then
+   test_prefix=/usr/local
+  else
+   test_prefix=$prefix
+  fi
+ else
+  test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+   t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+   TARGET_SYSTEM_ROOT_DEFINE="$t"
+   ;;
+ esac
+], [
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
+])
+AC_SUBST(TARGET_SYSTEM_ROOT)
+AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+
 # NOTE: Don't add -Wall or -Wunused, they both include
 # -Wunused-parameter which reports bogus warnings.
 # NOTE: If you add to this list, remember to update
@@ -1132,6 +1227,7 @@ AC_SUBST(IGNORE_SIM)
 AC_SUBST(IGNORE_SIM_OBS)
 
 AC_SUBST(ENABLE_CFLAGS)
+AC_SUBST(PROFILE_CFLAGS)
 
 AC_SUBST(CONFIG_OBS)
 AC_SUBST(CONFIG_LIB_OBS)
@@ -1143,67 +1239,6 @@ AC_SUBST(CONFIG_CLEAN)
 AC_SUBST(CONFIG_INSTALL)
 AC_SUBST(CONFIG_UNINSTALL)
 
-# 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* | *-pc-linux-gnu*)
-    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 grep 'some text already loaded' 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
@@ -1284,6 +1319,11 @@ case "${GDB_MULTI_ARCH}" in
     *)  AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");;
 esac
 
+if test x"${gdb_osabi}" != x ; then
+    AC_DEFINE_UNQUOTED(GDB_OSABI_DEFAULT, $gdb_osabi,
+                      [Define to the default OS ABI for this configuration.])
+fi
+
 # Enable multi-ice-gdb-server.
 AC_ARG_ENABLE(multi-ice,
 [  --enable-multi-ice      build the multi-ice-gdb-server],
@@ -1308,8 +1348,6 @@ if test "x$target" = "x$host"; then
 fi
 
 AC_CONFIG_SUBDIRS($configdirs)
-SUBDIRS=$subdirs
-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 link to an empty
This page took 0.02667 seconds and 4 git commands to generate.