cleaned up Solaris build issues

This commit is contained in:
Mark Pizzolato 2011-11-02 08:32:24 -07:00
parent cbc14bc010
commit 02c5302039

View file

@ -24,16 +24,20 @@ ifeq ($(WIN32),)
else else
ifeq (Linux,$(shell uname)) ifeq (Linux,$(shell uname))
LIBEXT = so LIBEXT = so
else
ifeq (SunOS,$(shell uname))
LIBEXT = so
else else
LIBEXT = a LIBEXT = a
endif endif
endif endif
endif
OS_CCDEFS = -D_GNU_SOURCE OS_CCDEFS = -D_GNU_SOURCE
ifeq (libm,$(shell if $(TEST) -e /usr/lib/libm.$(LIBEXT) -o -e /usr/lib64/libm.$(LIBEXT); then echo libm; fi)) ifeq (libm,$(shell if $(TEST) -e /usr/lib/libm.$(LIBEXT) -o -e /usr/lib64/libm.$(LIBEXT); then echo libm; fi))
OS_LDFLAGS += -lm OS_LDFLAGS += -lm
endif endif
ifeq (SunOS,$(shell uname)) ifeq (SunOS,$(shell uname))
OS_CCDEFS += -I/opt/sfw/include OS_CCDEFS += -I/opt/sfw/include -DSIM_ASYNCH_IO -DUSE_READER_THREAD
OS_LDFLAGS += -lsocket -lnsl -lrt -lm -lpthread -L/opt/sfw/lib -R/opt/sfw/lib OS_LDFLAGS += -lsocket -lnsl -lrt -lm -lpthread -L/opt/sfw/lib -R/opt/sfw/lib
endif endif
ifeq (cygwin,$(findstring cygwin,$(OSTYPE))) ifeq (cygwin,$(findstring cygwin,$(OSTYPE)))
@ -47,17 +51,24 @@ ifeq ($(WIN32),)
OS_LDFLAGS += -lpthread OS_LDFLAGS += -lpthread
endif endif
ifeq (readline,$(shell if $(TEST) -e /usr/lib/libreadline.$(LIBEXT) -o -e /usr/lib64/libreadline.$(LIBEXT) -o -e /opt/sfw/lib/libreadline.a; then echo readline; fi)) ifeq (readline,$(shell if $(TEST) -e /usr/lib/libreadline.$(LIBEXT) -o -e /usr/lib64/libreadline.$(LIBEXT) -o -e /opt/sfw/lib/libreadline.a; then echo readline; fi))
ifeq (readline_h,$(shell if $(TEST) -e /usr/include/readline/readline.h -o -e /usr/include/readline.h; then echo readline_h; fi)) ifeq (readline_h,$(shell if $(TEST) -e /usr/include/readline/readline.h -o -e /usr/include/readline.h -o -e /opt/sfw/include/readline/readline.h; then echo readline_h; fi))
# Use Locally installed and available readline support # Use Locally installed and available readline support
ifeq (ncurses,$(shell if $(TEST) -e /usr/lib/libncurses.$(LIBEXT) -o -e /opt/sfw/lib/libncurses.a; then echo ncurses; fi)) ifeq (ncurses,$(shell if $(TEST) -e /usr/lib/libncurses.$(LIBEXT) -o -e /opt/sfw/lib/libncurses.a; then echo ncurses; fi))
OS_CCDEFS += -DHAVE_READLINE OS_CCDEFS += -DHAVE_READLINE
OS_LDFLAGS += -lreadline -lncurses OS_LDFLAGS += -lreadline -lncurses
else else
ifeq (curses,$(shell if $(TEST) -e /usr/lib/libcurses.$(LIBEXT); then echo curses; fi))
OS_CCDEFS += -DHAVE_READLINE
OS_LDFLAGS += -lreadline -lcurses
else
ifeq (solaris_readline,$(shell if $(TEST) ! -e /opt/sfw/lib/libreadline.a; then echo solaris_readline; fi))
OS_CCDEFS += -DHAVE_READLINE OS_CCDEFS += -DHAVE_READLINE
OS_LDFLAGS += -lreadline OS_LDFLAGS += -lreadline
endif endif
endif endif
endif endif
endif
endif
ifeq (pcap,$(shell if $(TEST) -e /usr/include/pcap.h -o -e /opt/sfw/include/pcap.h; then echo pcap; fi)) ifeq (pcap,$(shell if $(TEST) -e /usr/include/pcap.h -o -e /opt/sfw/include/pcap.h; then echo pcap; fi))
# Use Locally installed and available pcap support # Use Locally installed and available pcap support
NETWORK_CCDEFS = -DUSE_NETWORK NETWORK_CCDEFS = -DUSE_NETWORK