diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-25 05:53:58 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-25 05:53:58 +0000 |
commit | 154fc96c348fb9c634762676070bc3345bd0cb98 (patch) | |
tree | e02d466f9222ecce808978be42ce3f28ed78c4e0 | |
parent | a430d16b6bab98a49a34758007c086790516a8b8 (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: http://svn.digium.com/svn/asterisk/trunk@22346 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | build_tools/Makefile | 12 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | makeopts.in | 3 |
3 files changed, 14 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 diff --git a/configure.ac b/configure.ac index 5c63428c3..4fe2c1f6d 100644 --- a/configure.ac +++ b/configure.ac @@ -161,6 +161,7 @@ AST_EXT_LIB([asound], [snd_spcm_init], [alsa/asoundlib.h], [ALSA], [Advanced Lin AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], []) AST_EXT_LIB([mfcr2], [mfcr2_MakeCall], [libmfcr2.h], [MFCR2], [MFCR2]) AST_EXT_LIB([nbs], [nbs_setup], [nbs.h], [NBS], [Network Broadcast Sound]) +AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], []) AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt]) AST_EXT_LIB([odbc], [SQLConnect], [sql.h], [UNIXODBC], [unixODBC]) AST_EXT_LIB([ogg], [ogg_sync_init], [], [OGG], [OGG]) diff --git a/makeopts.in b/makeopts.in index d897775b3..7350b292a 100644 --- a/makeopts.in +++ b/makeopts.in @@ -101,3 +101,6 @@ GSM_INCLUDE=@gsm_INCLUDE@ CURSES_LIB=@curses_LIB@ CURSES_INCLUDE=@curses_INCLUDE@ + +NCURSES_LIB=@ncurses_LIB@ +NCURSES_INCLUDE=@ncurses_INCLUDE@ |