[asterisk-commits] trunk r22346 - in /trunk: build_tools/Makefile configure.ac makeopts.in

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 24 22:53:58 MST 2006


Author: russell
Date: Tue Apr 25 00:53:58 2006
New Revision: 22346

URL: http://svn.digium.com/view/asterisk?rev=22346&view=rev
Log:
apparently some systems may have ncurses that doesn't provide backwards compat
with curses.  So, check for both and use whatever is found

Modified:
    trunk/build_tools/Makefile
    trunk/configure.ac
    trunk/makeopts.in

Modified: trunk/build_tools/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/Makefile?rev=22346&r1=22345&r2=22346&view=diff
==============================================================================
--- trunk/build_tools/Makefile (original)
+++ trunk/build_tools/Makefile Tue Apr 25 00:53:58 2006
@@ -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 @@
 	$(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

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=22346&r1=22345&r2=22346&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Apr 25 00:53:58 2006
@@ -161,6 +161,7 @@
 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])

Modified: trunk/makeopts.in
URL: http://svn.digium.com/view/asterisk/trunk/makeopts.in?rev=22346&r1=22345&r2=22346&view=diff
==============================================================================
--- trunk/makeopts.in (original)
+++ trunk/makeopts.in Tue Apr 25 00:53:58 2006
@@ -101,3 +101,6 @@
 
 CURSES_LIB=@curses_LIB@
 CURSES_INCLUDE=@curses_INCLUDE@
+
+NCURSES_LIB=@ncurses_LIB@
+NCURSES_INCLUDE=@ncurses_INCLUDE@



More information about the asterisk-commits mailing list