Permalink
Browse files

Allow the location of lib-oniguruma to be passed in

For example, to install via ports on Mac OS X 10.5:
sudo port install oniguruma5
sudo gem install oniguruma -- --with-onig-dir=/opt/local
  • Loading branch information...
1 parent 47ec5be commit ea02a110b623d278395d693a67b117084fb70959 @indirect indirect committed Dec 15, 2008
Showing with 8 additions and 3 deletions.
  1. +8 −3 ext/extconf.rb
View
@@ -1,4 +1,9 @@
require 'mkmf'
-have_library("onig")
-$CFLAGS='-Wall'
-create_makefile( "oregexp" )
+dir_config("onig")
+if have_library("onig")
+ $CFLAGS='-Wall'
+ create_makefile( "oregexp" )
+else
+ puts "Cannot find lib-oniguruma. Set location with e.g. --with-onig-dir=/opt/local"
+ exit 1
+end

0 comments on commit ea02a11

Please sign in to comment.