From: Craig A. Berry Date: Tue, 12 Jun 2001 23:55:26 +0000 (-0500) Subject: make ext/re play nice with DEBUGGING override X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd3cca2544a9395f0e53e881d854a52d1a0914a7;p=p5sagit%2Fp5-mst-13.2.git make ext/re play nice with DEBUGGING override Message-Id: p4raw-id: //depot/perl@10562 --- diff --git a/ext/re/Makefile.PL b/ext/re/Makefile.PL index 537704c..9706cc5 100644 --- a/ext/re/Makefile.PL +++ b/ext/re/Makefile.PL @@ -4,13 +4,23 @@ use Config; 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' }, ); diff --git a/ext/re/re.xs b/ext/re/re.xs index cc4dc69..faab0b3 100644 --- a/ext/re/re.xs +++ b/ext/re/re.xs @@ -1,9 +1,3 @@ -/* 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"