Browse Source

Changes to compile on solaris

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
ccdd979a69
  1. 14
      Makefile
  2. 1
      config.mak.in
  3. 2
      configure
  4. 7
      configure.ac
  5. 0
      src/platform_solaris.cc

14
Makefile

@ -25,6 +25,10 @@ ifeq ($(platform),linux)
LINKFLAGS += -pthread -lrt LINKFLAGS += -pthread -lrt
endif endif
ifeq ($(platform),solaris)
WANT_SOCKET = 1
endif
ifdef WANT_OPENSSL ifdef WANT_OPENSSL
HAVE_OPENSSL = 1 HAVE_OPENSSL = 1
HAVE_CRYPTO = 1 HAVE_CRYPTO = 1
@ -35,6 +39,10 @@ ifdef WANT_OPENSSL
OPENSSL_LINKFLAGS += -lssl -lcrypto OPENSSL_LINKFLAGS += -lssl -lcrypto
endif endif
ifdef WANT_SOCKET
LINKFLAGS += -lsocket -lnsl
endif
ifneq (,$(findstring build/libnode.so,$(MAKEFLAGS))) ifneq (,$(findstring build/libnode.so,$(MAKEFLAGS)))
CFLAGS += -shared -fPIC CFLAGS += -shared -fPIC
#else #else
@ -44,6 +52,7 @@ endif
cflags += -pedantic cflags += -pedantic
debug_CPPDEFINES = -DDEBUG $(CFLAGS) debug_CPPDEFINES = -DDEBUG $(CFLAGS)
debug_CFLAGS = -Wall -O0 -ggdb $(CFLAGS) debug_CFLAGS = -Wall -O0 -ggdb $(CFLAGS)
debug_CXXFLAGS = $(debug_CFLAGS) debug_CXXFLAGS = $(debug_CFLAGS)
@ -384,8 +393,9 @@ docclean:
clean: clean:
-rm -f node node_g $(builddir)/node $(builddir)/node_g -rm -f node node_g $(builddir)/node $(builddir)/node_g
-find $(builddir) -name "*.o" -or -name "*.a" \ -find $(builddir) -name "*.o" | xargs rm -f
-or -name "*.so" -or -name "*.dylib" | xargs rm -f -find $(builddir) -name "*.so" | xargs rm -f
-find $(builddir) -name "*.dylib" | xargs rm -f
-find . -name "*.pyc" | xargs rm -f -find . -name "*.pyc" | xargs rm -f
distclean: docclean distclean: docclean

1
config.mak.in

@ -30,3 +30,4 @@ export srcdir VPATH PREFIX
HAVE_OPENSSL=@HAVE_OPENSSL@ HAVE_OPENSSL=@HAVE_OPENSSL@
WANT_SOCKET=@WANT_SOCKET@

2
configure

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
cd $(dirname "$0") cd `dirname "$0"`
autoconf --output configure.real autoconf --output configure.real
exec ./configure.real "$@" exec ./configure.real "$@"

7
configure.ac

@ -116,6 +116,13 @@ AC_SEARCH_LIBS([dlopen], [dl dld], [], [
# TODO FIXME: Check for OpenSSL -- expect it to exist for now # TODO FIXME: Check for OpenSSL -- expect it to exist for now
AC_SUBST([HAVE_OPENSSL],[1]) AC_SUBST([HAVE_OPENSSL],[1])
# check for -lsocket on solaris
AC_CHECK_LIB([c], [socket], [WANT_SOCKET=], [WANT_SOCKET=1])
AC_SUBST(WANT_SOCKET)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Embedded dependencies # Embedded dependencies

0
src/platform_sunos.cc → src/platform_solaris.cc

Loading…
Cancel
Save