diff --git a/auxdir/x_ac_debug.m4 b/auxdir/x_ac_debug.m4
index b1b100dbba7e3e678b9591a26b6c60f832246d3c..755174fac1117cff94f564dd66a3b041eb59da7c 100644
--- a/auxdir/x_ac_debug.m4
+++ b/auxdir/x_ac_debug.m4
@@ -12,7 +12,6 @@
 #    If CFLAGS are not passed to configure, they will be set based
 #    on whether debugging has been enabled.  Also, the NDEBUG macro
 #    (used by assert) will be set accordingly.
-#    Always enable "-g" debug flag so debugger can work with srun.
 #
 #  WARNINGS:
 #    This macro must be placed after AC_PROG_CC or equivalent.
@@ -31,15 +30,15 @@ AC_DEFUN([X_AC_DEBUG],
       esac
     ]
   )
-
-  if test -z "$ac_save_CFLAGS"; then
-    test "$ac_cv_prog_cc_g" = yes && CFLAGS="-g $CFLAGS"
-  fi
-
+#
+#  if test -z "$ac_save_CFLAGS"; then
+#    test "$ac_cv_prog_cc_g" = yes && CFLAGS="-g $CFLAGS"
+#  fi
+#
   if test "$ac_debug" = yes; then
     if test -z "$ac_save_CFLAGS"; then
       test "$GCC" = yes && 
-           CFLAGS="-Wall -fno-strict-aliasing $CFLAGS"
+           CFLAGS="-g -Wall -fno-strict-aliasing $CFLAGS"
       AC_DEFINE(DEBUG_SYSTEM, 1, [Define for extra debug messages.])
     fi
   else
diff --git a/configure.ac b/configure.ac
index 55b8450ee31c329fa2dc9e661dda488299897bd2..78e04cdc14d970d3157dfa17080f67b2df611307 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,8 @@ AC_PROG_CXX
 AC_PROG_MAKE_SET
 AC_PROG_LIBTOOL
 
+CFLAGS=
+
 AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
 
 
diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am
index d09f616caaa0928fc42940685e6b6c48cd1df1da..cdac2fffb3d4d896b3afb1522965616f557311c5 100644
--- a/src/srun/Makefile.am
+++ b/src/srun/Makefile.am
@@ -18,6 +18,7 @@ srun_SOURCES = \
 	launch.c    \
 	launch.h    \
 	attach.h    \
+	attach.c    \
 	reattach.c  \
 	reattach.h  \
 	fname.c     \
@@ -46,6 +47,9 @@ force:
 $(convenience_libs) : force
 	@cd `dirname $@` && $(MAKE) `basename $@`
 
+attach.o : attach.c
+	$(COMPILE) -c -g -o attach.o $(srcdir)/attach.c 
+
 install-exec-local:
 	umask 022; \
 	if [ -x /usr/lib/rpm/debugedit ]; then \
diff --git a/src/srun/attach.c b/src/srun/attach.c
new file mode 100644
index 0000000000000000000000000000000000000000..a4f088504f2537becebe1f0342b630a67f110f08
--- /dev/null
+++ b/src/srun/attach.c
@@ -0,0 +1,57 @@
+/*****************************************************************************\
+ *  attach.c - Definitions needed for parallel debugger
+ *  $Id$
+ *****************************************************************************
+ *  Copyright (C) 2002 The Regents of the University of California.
+ *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ *  Written by Mark Grondona <grondona1@llnl.gov>, et. al.
+ *  UCRL-CODE-2002-040.
+ *  
+ *  This file is part of SLURM, a resource management program.
+ *  For details, see <http://www.llnl.gov/linux/slurm/>.
+ *  
+ *  SLURM is free software; you can redistribute it and/or modify it under
+ *  the terms of the GNU General Public License as published by the Free
+ *  Software Foundation; either version 2 of the License, or (at your option)
+ *  any later version.
+ *  
+ *  SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
+ *  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ *  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ *  details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with SLURM; if not, write to the Free Software Foundation, Inc.,
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
+\*****************************************************************************/
+
+#if HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include "src/common/log.h"
+
+#include "src/srun/attach.h"
+
+/*
+ *  Instantiate extern variables from attach.h
+ */
+MPIR_PROCDESC *MPIR_proctable;
+int MPIR_proctable_size;
+VOLATILE int MPIR_debug_state;
+VOLATILE int MPIR_debug_gate;
+int MPIR_being_debugged;
+int MPIR_i_am_starter;
+int MPIR_acquired_pre_main;
+char *totalview_jobid;
+
+void MPIR_Breakpoint(void)
+{
+	/* 
+	 * This just notifies parallel debugger that some event of 
+	 *  interest occurred.
+	 */ 
+	debug("In MPIR_Breakpoint");
+}
+
+
diff --git a/src/srun/msg.c b/src/srun/msg.c
index b755e892055ff4b14d13ed6b2d2bac674f23dd01..b7b60f9fe29d1408f6100303ff216487ebff4dde 100644
--- a/src/srun/msg.c
+++ b/src/srun/msg.c
@@ -169,13 +169,6 @@ void debugger_launch_failure(void)
 	}
 }
 
-void MPIR_Breakpoint(void)
-{
-	debug("In MPIR_Breakpoint");
-	/* This just notifies parallel 
-         * debugger that some event of interest occurred */ 
-}
-
 /*
  * Job has been notified of it's approaching time limit. 
  * Job will be killed shortly after timeout.
diff --git a/src/srun/opt.c b/src/srun/opt.c
index 6e3f2b80231c65acb7c7217b33e3b7dce028923e..60e55e2b53bf9c9510814c79ad59d7a52c0dc835 100644
--- a/src/srun/opt.c
+++ b/src/srun/opt.c
@@ -65,18 +65,6 @@
 #include "src/srun/opt.h"
 #include "src/srun/attach.h"
 
-/*
- *  Instantiate extern variables from attach.h
- */
-   MPIR_PROCDESC *MPIR_proctable;
-   int MPIR_proctable_size;
-   VOLATILE int MPIR_debug_state;
-   VOLATILE int MPIR_debug_gate;
-   int MPIR_being_debugged;
-   int MPIR_i_am_starter;
-   int MPIR_acquired_pre_main;
-   char *totalview_jobid;
-
 /* generic OPT_ definitions -- mainly for use with env vars  */
 #define OPT_NONE        0x00
 #define OPT_INT         0x01