summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-04-25 05:53:58 +0000
committerRussell Bryant <russell@russellbryant.com>2006-04-25 05:53:58 +0000
commite386a192ee5881f8aa43dcc902eb5cd79369f650 (patch)
treee02d466f9222ecce808978be42ce3f28ed78c4e0 /build_tools
parent7918a7a1fd3f46754dd2123c103364ea20f984e5 (diff)
apparently some systems may have ncurses that doesn't provide backwards compat
with curses. So, check for both and use whatever is found git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools')
-rw-r--r--build_tools/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/build_tools/Makefile b/build_tools/Makefile
index 7f4d8b4ec..0825cd6cc 100644
--- a/build_tools/Makefile
+++ b/build_tools/Makefile
@@ -1,6 +1,14 @@
MENUSELECT_OBJS=menuselect.o menuselect_curses.o ../strcompat.o
MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
-MENUSELECT_LIBS=../mxml/libmxml.a $(CURSES_LIB)
+MENUSELECT_LIBS=../mxml/libmxml.a
+
+ifneq ($(NCURSES_LIB),)
+ MENUSELECT_LIBS+=$(NCURSES_LIB)
+ MENUSELECT_INCLUDE=$(NCURSES_INCLUDE)
+else
+ MENUSELECT_LIBS+=$(CURSES_LIB)
+ MENUSELECT_INCLUDE=$(CURSES_INCLUDE)
+endif
menuselect: $(MENUSELECT_OBJS)
$(CC) -g -o $@ $(MENUSELECT_OBJS) $(MENUSELECT_LIBS)
@@ -9,7 +17,7 @@ menuselect.o: menuselect.c menuselect.h
$(CC) -o $@ $(MENUSELECT_CFLAGS) $<
menuselect_curses.o: menuselect_curses.c menuselect.h
- $(CC) -o $@ $(MENUSELECT_CFLAGS) $(CURSES_INCLUDE) $<
+ $(CC) -o $@ $(MENUSELECT_CFLAGS) $(MENUSELECT_INCLUDE) $<
clean:
rm -f menuselect *.o