From 15fe4f786fa5d8eb5e719a497cd68dc770e4e274 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Sun, 2 Jul 2023 15:31:44 +0100 Subject: [PATCH] Move OpenSolaris special config to the configure script --- Makefile | 7 ------- configure.ac | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index fb64d4d..6683fb1 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,6 @@ ifeq ($(shell uname -o),Msys) CONFIG_TARGET=mingw else ifeq ($(shell uname -s),Darwin) CONFIG_TARGET=darwin -else ifeq ($(shell uname), SunOS) -CONFIG_TARGET=sunos else CONFIG_TARGET=generic endif @@ -162,11 +160,6 @@ LINT_CCODE=\ LDLIBS+=-ln2n LDLIBS+=$(LDLIBS_EXTRA) -#For OpenSolaris (Solaris too?) -ifeq ($(CONFIG_TARGET), sunos) -LDLIBS+=-lsocket -lnsl -endif - ifeq ($(CONFIG_TARGET),mingw) CFLAGS+=-I. -I./win32 LDLIBS+=$(abspath win32/n2n_win32.a) diff --git a/configure.ac b/configure.ac index 354eebe..b4c5604 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,14 @@ AC_PROG_CC AC_CHECK_TOOL([AR], [ar], [false]) AC_CHECK_TOOL([WINDRES], [windres], [windres]) +case "$host_os" in + *-solaris*) + # Was in Makefile with the test `uname` -eq "SunOS" + # and comment "For OpenSolaris (Solaris too?)" + LIBS="-lsocket -lnsl $LIBS" + ;; +esac + # TODO: ideally, should use AC_ARG_ENABLE AC_ARG_WITH([edgex], AS_HELP_STRING([--with-edgex], [Build for Ubiquity-X]),