my $object = 're_exec$(OBJ_EXT) re_comp$(OBJ_EXT) re$(OBJ_EXT)';
+my $defines = '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG';
+
+# We need to pretend that DEBUGGING is in effect even if it's
+# not but we need to remember that we pretended so we can avoid
+# linking to things that aren't there.
+
+if ($Config{'usedebugging_perl'} ne 'Y') {
+ $defines .= ' -DDEBUGGING -DWAS_NOT_DEBUGGING';
+}
+
WriteMakefile(
NAME => 're',
VERSION_FROM => 're.pm',
MAN3PODS => {}, # Pods will be built by installman.
XSPROTOARG => '-noprototypes',
OBJECT => $object,
- DEFINE => '-DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG',
+ DEFINE => $defines,
clean => { FILES => '*$(OBJ_EXT) *.c ../../lib/re.pm' },
);
-/* We need access to debugger hooks */
-#ifndef DEBUGGING
-# define DEBUGGING
-# define WAS_NOT_DEBUGGING
-#endif
-
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"