Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make it compile on linux as well

  • Loading branch information...
commit 3cfc98688198846f652ac976b535eb7de86f6b39 1 parent 657b1f7
@mmangino authored
Showing with 15 additions and 5 deletions.
  1. +1 −1  extconf.rb
  2. +6 −1 main.c
  3. +2 −2 shapelib.gemspec
  4. +6 −1 shpplus.c
View
2  extconf.rb
@@ -2,6 +2,6 @@
require 'mkmf'
dir_config('shapelib')
-have_header('shapefil.h') or raise 'shapefil.h not found'
+have_header('shapefil.h') or have_header('libshp/shapefil.h') or raise 'shapefil.h not found'
have_library('shp') or raise 'libshp not found'
create_makefile('shapelib')
View
7 main.c
@@ -1,5 +1,10 @@
#include <ruby.h>
-#include <shapefil.h>
+#if defined(HAVE_SHAPEFIL_H)
+ #include <shapefil.h>
+#endif
+#if defined(HAVE_LIBSHP_SHAPEFIL_H)
+ #include <libshp/shapefil.h>
+#endif
#include "shpplus.h"
typedef struct {
View
4 shapelib.gemspec
@@ -1,10 +1,10 @@
Gem::Specification.new do |s|
s.name = %q{shapelib}
- s.version = "0.6.1"
+ s.version = "0.6.2"
s.files = %w{depend extconf.rb Interface.html Interface.rd libtest.rb main.c README.txt sfcode.h sflist.h shapelib.gemspec shpplus.c shpplus.h spcode.h splist.h spwkt.h style.css valconv.h zsample1.rb ztest1.rb lib/shapelib.rb lib/shape_lib/shape.rb}
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["prasinos@users.sourceforge.net", "Mike Mangino"]
- s.date = %q{2008-02-13}
+ s.date = %q{2008-12-30}
s.description = %q{== DESCRIPTION: A ruby wrapper around the shapefile library}
s.email = %q{mmangino@elevatedrails.com}
s.has_rdoc = false
View
7 shpplus.c
@@ -1,7 +1,12 @@
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
-#include <shapefil.h>
+#if defined(HAVE_SHAPEFIL_H)
+ #include <shapefil.h>
+#endif
+#if defined(HAVE_LIBSHP_SHAPEFIL_H)
+ #include <libshp/shapefil.h>
+#endif
#include <ruby.h>
#include "shpplus.h"
Please sign in to comment.
Something went wrong with that request. Please try again.