From 6e96dd112a6a4c2d0237324cd1d34295bb10405f Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Fri, 13 Feb 2015 01:49:30 +0900 Subject: [PATCH] added -DSQLITE_ENABLE_API_ARMOR for developers --- Makefile.PL | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index 5317d5e..ed8c0f3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,6 +5,10 @@ use ExtUtils::MakeMaker; use Config; use File::Spec; +sub DEVELOPER_ONLY () { + return -d '.git' ? 1 : 0; +} + # Some dependencies need to be more aggressive on Windows sub WINLIKE () { return 1 if $^O eq 'MSWin32'; @@ -224,6 +228,12 @@ my @CC_DEFINE = ( '-DSQLITE_ENABLE_STAT4', # for sqlite >= 3.8.3.1 '-DNDEBUG=1', ); + +if (DEVELOPER_ONLY) { + # for sqlite >= 3.8.8 + push @CC_DEFINE, '-DSQLITE_ENABLE_API_ARMOR'; +} + if ( $^O eq 'cygwin') { push @CC_DEFINE, '-DSQLITE_TEMP_STORE=2'; }