Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | Use pkg-config to search for ncurses libraries |
| 2 | |
| 3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 4 | Upstream-Status: Pending |
| 5 | Index: iptraf-ng-1.1.4/Makefile |
| 6 | =================================================================== |
| 7 | --- iptraf-ng-1.1.4.orig/Makefile |
| 8 | +++ iptraf-ng-1.1.4/Makefile |
| 9 | @@ -205,8 +205,8 @@ endif |
| 10 | |
| 11 | ifndef NCURSES_LDFLAGS |
| 12 | ifdef NEEDS_NCURSES5 |
| 13 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) |
| 14 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) |
| 15 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) |
| 16 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) |
| 17 | ifndef NO_PANEL |
| 18 | NCURSES_LDFLAGS += -lpanel |
| 19 | endif |
| 20 | @@ -215,8 +215,8 @@ endif |
| 21 | |
| 22 | ifndef NCURSES_LDFLAGS |
| 23 | ifdef NEEDS_NCURSESW5 |
| 24 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) |
| 25 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) |
| 26 | + NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null) |
| 27 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 28 | ifndef NO_PANEL |
| 29 | NCURSES_LDFLAGS += -lpanel |
| 30 | endif |
| 31 | @@ -225,8 +225,8 @@ endif |
| 32 | |
| 33 | ifndef NCURSES_LDFLAGS |
| 34 | ifdef NEEDS_NCURSES6 |
| 35 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) |
| 36 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) |
| 37 | + NCURSES_CFLAGS := $(shell pkg-config ncurses6 --cflags 2>/dev/null) |
| 38 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses6 --libs 2>/dev/null) |
| 39 | ifndef NO_PANEL |
| 40 | NCURSES_LDFLAGS += -lpanel |
| 41 | endif |
| 42 | @@ -235,8 +235,8 @@ endif |
| 43 | |
| 44 | ifndef NCURSES_LDFLAGS |
| 45 | ifdef NEEDS_NCURSESW6 |
| 46 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) |
| 47 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) |
| 48 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) |
| 49 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 50 | ifndef NO_PANEL |
| 51 | NCURSES_LDFLAGS += -lpanel |
| 52 | endif |
| 53 | @@ -246,17 +246,17 @@ endif |
| 54 | # try find ncuses by autodetect |
| 55 | ifndef NCURSES_LDFLAGS |
| 56 | ifneq ($(shell ncursesw6-config --libs 2>/dev/null),) |
| 57 | - NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null) |
| 58 | - NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null) |
| 59 | - else ifneq ($(shell ncurses6-config --libs 2>/dev/null),) |
| 60 | - NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null) |
| 61 | - NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null) |
| 62 | - else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),) |
| 63 | - NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null) |
| 64 | - NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null) |
| 65 | - else ifneq ($(shell ncurses5-config --libs 2>/dev/null),) |
| 66 | - NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null) |
| 67 | - NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null) |
| 68 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) |
| 69 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 70 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) |
| 71 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) |
| 72 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) |
| 73 | + else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),) |
| 74 | + NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null) |
| 75 | + NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null) |
| 76 | + else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),) |
| 77 | + NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null) |
| 78 | + NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null) |
| 79 | endif |
| 80 | |
| 81 | ifneq ($(NCURSES_LDFLAGS),) |