diff --git a/configure b/configure index 9dc277528e..31567f1140 100755 --- a/configure +++ b/configure @@ -488,6 +488,9 @@ USEROSTYPE="gnulinux" HAVE_LIB_DL="1" DL_LIBS="-ldl" else +if [ "$HOST_OS" = "sunos" ]; then +USEROSTYPE="solaris" +else if [ "$HOST_OS" = "gnu/kfreebsd" ]; then USEROSTYPE="bsd" else @@ -501,7 +504,7 @@ if [ "$HOST_OS" = "openbsd" ]; then USEROSTYPE="bsd" else if [ "$HOST_OS" = "darwin" ]; then -USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi +USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi if [ "$LIBVERSION" = "xxx" ]; then LIBVERSION="$VERSION"; fi SEDFLAGS=" -e '" diff --git a/configure.acr b/configure.acr index c8bcf4117b..fe2c113693 100644 --- a/configure.acr +++ b/configure.acr @@ -106,6 +106,9 @@ IFEQ USEROSTYPE auto ; { HAVE_LIB_DL = 1 ; DL_LIBS = -ldl ; }{ + IFEQ HOST_OS sunos ; { + USEROSTYPE = solaris ; + }{ IFEQ HOST_OS gnu/kfreebsd ; { USEROSTYPE = bsd ; }{ @@ -120,7 +123,7 @@ IFEQ USEROSTYPE auto ; { }{ IFEQ HOST_OS darwin ; { USEROSTYPE = darwin ; - } } } } } } } } } + } } } } } } } } } } } ARG_WITHOUT WITHPIC pic do not build libr as a program independent location ; diff --git a/libr/Makefile b/libr/Makefile index fd230afa99..619bd86354 100644 --- a/libr/Makefile +++ b/libr/Makefile @@ -151,15 +151,15 @@ install: install-includes install-pkgconfig # TODO :Use INSTALL_DATA_DIR instead of mkdir # libraries @${INSTALL_DIR} "${DESTDIR}${LIBDIR}" - @$(foreach lib,$(shell find * -type f | grep -e '\.${EXT_SO}$$' | grep -Ev '(lib|parse)/t/' | grep lib | grep -v /bin/ | grep -v /p/), \ + @$(foreach lib,$(shell find * -type f -iname "*.${EXT_SO}" | grep -v '(lib|parse)/t/' | grep lib | grep -v /bin/ | grep -v /p/), \ echo " ${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \ rm -f "${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \ ${INSTALL_LIB} "$(lib)" "${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \ ( cd "${DESTDIR}${LIBDIR}" ; ln -fs "$(call libpath-to-name-version,$(lib),${LIBVERSION})" "$(call libpath-to-name,$(lib))" ) ; \ ) # object archives - @for FILE in `find * -type f | grep -e '\.a$$' | grep -v fs/p` ; do \ - echo " ${DESTDIR}${LIBDIR}/$$FILE"; ${INSTALL_DATA} $$FILE "${DESTDIR}${LIBDIR}" ; done + @for FILE in `find * -type f -iname "*.a" | grep -v fs/p` ; do \ + echo " ${DESTDIR}${LIBDIR}/$$FILE"; ${INSTALL_DATA} $$FILE "${DESTDIR}${LIBDIR}" ; done || true # plugins @${INSTALL_DIR} "${DESTDIR}${LIBDIR}/radare2/${VERSION}" @for FILE in `find */p -perm -u+x -type f | grep -v exe | grep -v dll | grep ${EXT_SO}`; \ diff --git a/libr/config.mk.tail b/libr/config.mk.tail index 47c7805001..0ddb2028d6 100644 --- a/libr/config.mk.tail +++ b/libr/config.mk.tail @@ -181,6 +181,13 @@ EXT_SO=so EXT_EXE= TH_LIBS= endif +ifeq (${OSTYPE},solaris) +CFLAGS+=-D__UNIX__=1 +EXT_AR=a +EXT_SO=so +EXT_EXE= +TH_LIBS= +endif ifeq (${EXT_SO},) main: diff --git a/libr/debug/p/debug_native.c b/libr/debug/p/debug_native.c index 30463d01fe..3ef10927dd 100755 --- a/libr/debug/p/debug_native.c +++ b/libr/debug/p/debug_native.c @@ -24,7 +24,7 @@ static void r_debug_native_stop(RDebug *dbg); #if __UNIX__ || __CYGWIN__ # include -# if !defined (__HAIKU__) && !defined (__CYGWIN__) +# if !defined (__HAIKU__) && !defined (__CYGWIN__) && !defined (__sun) # include # endif # include diff --git a/libr/include/r_types.h b/libr/include/r_types.h index 75ceac84a3..1e0122d6c0 100644 --- a/libr/include/r_types.h +++ b/libr/include/r_types.h @@ -73,7 +73,7 @@ #define MINGW32 1 #endif -#if defined(EMSCRIPTEN) || defined(__linux__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__) || defined(__QNX__) +#if defined(EMSCRIPTEN) || defined(__linux__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__) || defined(__QNX__) || defined(__sun) #define __BSD__ 0 #define __UNIX__ 1 #endif diff --git a/libr/socket/run.c b/libr/socket/run.c index 5564cb1ade..8b8a1888c3 100644 --- a/libr/socket/run.c +++ b/libr/socket/run.c @@ -37,6 +37,9 @@ #include #include #include +#if defined(__sun) +#include +#endif #if __linux__ && !__ANDROID__ #include #include @@ -47,7 +50,7 @@ #endif #endif -#define HAVE_PTY __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK +#define HAVE_PTY __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK && !defined(__sun) R_API RRunProfile *r_run_new(const char *str) { RRunProfile *p = R_NEW (RRunProfile);