summaryrefslogtreecommitdiff
path: root/ext/json/ext/extconf_parser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/json/ext/extconf_parser.rb')
-rw-r--r--ext/json/ext/extconf_parser.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/json/ext/extconf_parser.rb b/ext/json/ext/extconf_parser.rb
new file mode 100644
index 0000000..9662e9a
--- /dev/null
+++ b/ext/json/ext/extconf_parser.rb
@@ -0,0 +1,14 @@
+require 'mkmf'
+require 'rbconfig'
+
+unless $CFLAGS.gsub!(/ -O[\dsz]?/, ' -O3')
+ $CFLAGS << ' -O3'
+end
+if CONFIG['CC'] =~ /gcc/
+ $CFLAGS << ' -Wall'
+ #$CFLAGS.gsub!(/ -O[\dsz]?/, ' -O0 -ggdb')
+end
+
+have_header("ruby/st.h") || have_header("st.h")
+have_header("re.h")
+create_makefile 'parser'