]> git.pld-linux.org Git - packages/asterisk.git/blob - external-libedit.patch
- desc the missing features
[packages/asterisk.git] / external-libedit.patch
1 Index: build_tools/menuselect-deps.in
2 ===================================================================
3 --- build_tools/menuselect-deps.in      (revision 226061)
4 +++ build_tools/menuselect-deps.in      (working copy)
5 @@ -17,6 +17,7 @@
6  IXJUSER=@PBX_IXJUSER@
7  JACK=@PBX_JACK@
8  LDAP=@PBX_LDAP@
9 +LIBEDIT=@PBX_LIBEDIT@
10  LTDL=@PBX_LTDL@
11  LUA=@PBX_LUA@
12  MISDN=@PBX_MISDN@
13 Index: configure.ac
14 ===================================================================
15 --- configure.ac        (revision 226061)
16 +++ configure.ac        (working copy)
17 @@ -232,6 +232,7 @@
18  AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
19  AST_EXT_LIB_SETUP([JACK], [Jack Audio Connection Kit], [jack])
20  AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
21 +AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit])
22  AST_EXT_LIB_SETUP([LTDL], [libtool], [ltdl])
23  AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
24  AST_EXT_LIB_SETUP([MISDN], [mISDN User Library], [misdn])
25 @@ -1593,6 +1594,27 @@
26  AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
27  AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [-lpthread -lz -lm])
28  
29 +PBX_LIBEDIT=0
30 +LIBEDIT_INCLUDE=-Ieditline/readline
31 +LIBEDIT_LIB=
32 +LIBEDIT_OBJ=editline/libedit.a
33 +if test  "${USE_LIBEDIT}" != "no"; then
34 +   AC_CHECK_TOOL(PKGCONFIG, pkg-config, no)
35 +   if test "${PKGCONFIG}" != "no"; then
36 +      if ${PKGCONFIG} --exists libedit; then
37 +         LIBEDIT_INCLUDE=$(${PKGCONFIG} libedit --cflags)
38 +         LIBEDIT_LIB=$(${PKGCONFIG} libedit --libs)
39 +         LIBEDIT_OBJ=
40 +         PBX_LIBEDIT=1
41 +         AC_DEFINE([HAVE_LIBEDIT], 1, [Define if your system has the NetBSD Editline libraries.])
42 +      fi
43 +   fi
44 +fi
45 +AC_SUBST(PBX_LIBEDIT)
46 +AC_SUBST(LIBEDIT_INCLUDE)
47 +AC_SUBST(LIBEDIT_LIB)
48 +AC_SUBST(LIBEDIT_OBJ)
49 +
50  # possible places for video4linux version 1
51  AC_CHECK_HEADER([linux/videodev.h],
52         [AC_DEFINE_UNQUOTED([HAVE_VIDEODEV_H], 1, [Define to 1 if your system has linux/videodev.h.])])
53 Index: main/Makefile
54 ===================================================================
55 --- main/Makefile       (revision 226061)
56 +++ main/Makefile       (working copy)
57 @@ -129,6 +129,8 @@
58         $(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o -lm
59         rm ast_expr2.o ast_expr2f.o 
60  
61 +cli.o: ASTCFLAGS+=$(LIBEDIT_INCLUDE)
62 +
63  ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
64  http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
65  endif
66 @@ -161,13 +163,13 @@
67  GMIMELDFLAGS+=$(GMIME_LIB)
68  endif
69  
70 -$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
71 +$(MAIN_TGT): $(OBJS) $(LIBEDIT_OBJ) db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
72         @$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
73         $(ECHO_PREFIX) echo "   [LD] $^ -> $@"
74  ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
75 -       $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS)
76 +       $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS) $(LIBEDIT_LIB)
77  else
78 -       $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS)
79 +       $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $^ buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS) $(LIBEDIT_LIB)
80  endif
81         $(CMD_PREFIX) $(ASTTOPDIR)/build_tools/strip_nonapi $@ || rm $@
82  
83 Index: main/cli.c
84 ===================================================================
85 --- main/cli.c  (revision 226061)
86 +++ main/cli.c  (working copy)
87 @@ -34,6 +34,8 @@
88  #include <ctype.h>
89  #include <regex.h>
90  
91 +#include <readline.h>
92 +
93  #include "asterisk/cli.h"
94  #include "asterisk/linkedlists.h"
95  #include "asterisk/module.h"
96 @@ -42,7 +44,6 @@
97  #include "asterisk/utils.h"
98  #include "asterisk/app.h"
99  #include "asterisk/lock.h"
100 -#include "editline/readline/readline.h"
101  #include "asterisk/threadstorage.h"
102  
103  /*!
104 Index: makeopts.in
105 ===================================================================
106 --- makeopts.in (revision 226061)
107 +++ makeopts.in (working copy)
108 @@ -246,3 +246,7 @@
109  
110  # if poll is not present, let the makefile know.
111  POLL_AVAILABLE=@HAS_POLL@
112 +
113 +LIBEDIT_INCLUDE=@LIBEDIT_INCLUDE@
114 +LIBEDIT_LIB=@LIBEDIT_LIB@
115 +LIBEDIT_OBJ=@LIBEDIT_OBJ@
This page took 0.043216 seconds and 3 git commands to generate.