JuliaMath / openspecfun

A collection of special mathematical functions
Other
35 stars 20 forks source link

Add Make.inc bits for illumos #18

Closed rmustacc closed 10 years ago

rmustacc commented 10 years ago

While trying to build openspecfun on SmartOS, I found that the build failed because it was missing information in Make.inc. Specifically it needs:

diff --git a/Make.inc b/Make.inc
index 3754245..49c6d3d 100644
--- a/Make.inc
+++ b/Make.inc
@@ -108,6 +108,13 @@ override CFLAGS_add += -fPIC
 override FFLAGS_add += -fPIC
 endif

+ifeq ($(OS), SunOS)
+SHLIB_EXT = so
+SONAME_FLAG = -soname
+override CFLAGS_add += -fPIC
+override FFLAGS_add += -fPIC
+endif
+
 ifeq ($(OS), Darwin)
 SONAME_FLAG = -install_name
 SHLIB_EXT = dylib

It'd be great if that could be added and the referenced dependency in julia refer to something with this fix. I can verify that this causes the build to work correctly. I can't comment on the broader use of this with julia, as that build is still a work in progress.

nalimilan commented 10 years ago

Thanks for the patch! At this point, it seems it would make more sense to merge Linux, FreeBSD and SunOS under the same if block. Maybe it would even be better to test for Windows and OS X, and use default options for all other OSes (which would probably work for OpenBSD and other Unix-like systems).

If others agree with this proposal, could you make a pull request to implement it (you can simply edit the file in Github to do that)?

ViralBShah commented 10 years ago

Ok with that.