aboutsummaryrefslogtreecommitdiff
path: root/gas/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gas/aclocal.m4')
-rw-r--r--gas/aclocal.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/gas/aclocal.m4 b/gas/aclocal.m4
index d9d03c7..39b8b30 100644
--- a/gas/aclocal.m4
+++ b/gas/aclocal.m4
@@ -74,3 +74,17 @@ assert (a == b
AC_MSG_RESULT($gas_cv_assert_ok)
test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT)
])dnl
+dnl
+dnl GAS_GDBINIT
+dnl Generates a .gdbinit file in the build directory pointing gdb to
+dnl srcdir, if srcdir != PWD.
+AC_DEFUN(GAS_GDBINIT,
+[if test `cd $srcdir;pwd` = `pwd` ; then
+ rm -f .gdbinit
+ cat > .gdbinit << EOF
+dir $srcdir
+dir .
+source $srcdir/.gdbinit
+EOF
+fi
+])dnl