Signed-off-by: Dennis Stosberg <dennis@xxxxxxxxxxxx> --- Makefile | 11 +++++++++-- config.mak.in | 1 + configure.ac | 10 ++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3cb6531..d352901 100644 --- a/Makefile +++ b/Makefile @@ -67,8 +67,10 @@ # Define NEEDS_SSL_WITH_CRYPTO if you ne # # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). # -# Define NEEDS_SOCKET if linking with libc is not enough (SunOS, -# Patrick Mauritz). +# Define NEEDS_SOCKET if linking with libc is not enough for socket() +# (SunOS, Patrick Mauritz). +# +# Define NEEDS_RT if linking with libc is not enough for nanosleep() (SunOS) # # Define NO_MMAP if you want to avoid mmap. # @@ -336,6 +338,7 @@ endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease NEEDS_NSL = YesPlease + NEEDS_RT = YesPlease SHELL_PATH = /bin/bash NO_STRCASESTR = YesPlease ifeq ($(uname_R),5.8) @@ -479,6 +482,10 @@ ifdef NEEDS_NSL EXTLIBS += -lnsl SIMPLE_LIB += -lnsl endif +ifdef NEEDS_RT + EXTLIBS += -lrt + SIMPLE_LIB += -lrt +endif ifdef NO_D_TYPE_IN_DIRENT BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT endif diff --git a/config.mak.in b/config.mak.in index 369e611..038767e 100644 --- a/config.mak.in +++ b/config.mak.in @@ -29,6 +29,7 @@ NO_CURL=@NO_CURL@ NO_EXPAT=@NO_EXPAT@ NEEDS_LIBICONV=@NEEDS_LIBICONV@ NEEDS_SOCKET=@NEEDS_SOCKET@ +NEEDS_RT=@NEEDS_RT@ NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@ NO_D_TYPE_IN_DIRENT=@NO_D_TYPE_IN_DIRENT@ NO_SOCKADDR_STORAGE=@NO_SOCKADDR_STORAGE@ diff --git a/configure.ac b/configure.ac index 36f9cd9..6f1d87a 100644 --- a/configure.ac +++ b/configure.ac @@ -148,13 +148,19 @@ AC_CHECK_LIB([c], [iconv], [NEEDS_LIBICONV=YesPlease]) AC_SUBST(NEEDS_LIBICONV) # -# Define NEEDS_SOCKET if linking with libc is not enough (SunOS, -# Patrick Mauritz). +# Define NEEDS_SOCKET if linking with libc is not enough for socket() +# (SunOS, Patrick Mauritz). AC_CHECK_LIB([c], [socket], [NEEDS_SOCKET=], [NEEDS_SOCKET=YesPlease]) AC_SUBST(NEEDS_SOCKET) test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket" +# +# Define NEEDS_RT if linking with libc is not enough for nanosleep (SunOS) +AC_CHECK_LIB([c], [nanosleep], +[NEEDS_RT=], +[NEEDS_RT=YesPlease]) +AC_SUBST(NEEDS_RT) ## Checks for header files. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html