Add support for both, ncurses and ncursesw.
[liboping.git] / src / Makefile.am
index 29e7d92..844e0a4 100644 (file)
@@ -46,7 +46,7 @@ bin_PROGRAMS += noping
 
 noping_SOURCES = oping.c
 noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1
-noping_LDADD = liboping.la -lm -lncurses
+noping_LDADD = liboping.la -lm $(NCURSES_LIB)
 if BUILD_WITH_LIBRT
 noping_LDADD += -lrt
 endif
@@ -56,11 +56,11 @@ install-exec-hook:
        @if test "x0" = "x$$UID"; then \
                if test "xLinux" = "x`uname -s`"; then \
                        echo "Setting CAP_NET_RAW capability on binaries."; \
-                       setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping; \
-                       setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping; \
+                       setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping || true; \
+                       setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping || true; \
                else \
                        echo "Setting set-UID bit on binaries."; \
-                       chmod u+s $(DESTDIR)$(bindir)/oping; \
-                       chmod u+s $(DESTDIR)$(bindir)/noping; \
+                       chmod u+s $(DESTDIR)$(bindir)/oping || true; \
+                       chmod u+s $(DESTDIR)$(bindir)/noping || true; \
                fi; \
        fi