Browse code

kamcmd: removed snv id from version output

- on darwin, use gnu readline from /opt/local if available
- version set to 1.5

Daniel-Constantin Mierla authored on 06/01/2017 13:40:33
Showing 2 changed files
... ...
@@ -6,7 +6,7 @@ include $(COREPATH)/Makefile.defs
6 6
 include $(COREPATH)/Makefile.targets
7 7
 
8 8
 auto_gen=
9
-RELEASE=0.2
9
+RELEASE=1.5
10 10
 UTIL_SRC_NAME=kamcmd
11 11
 ifeq ($(FLAVOUR),ser)
12 12
 	NAME?=sercmd
... ...
@@ -56,6 +56,9 @@ ifeq ($(OS), netbsd)
56 56
 	LIBS:=
57 57
 endif
58 58
 ifeq ($(OS), darwin)
59
+readline_locations= /opt/local/include/readline/readline.h \
60
+					/usr/include/readline/readline.h \
61
+					$(LOCALBASE)/include/readline/readline.h
59 62
 	LIBS:= -lresolv
60 63
 endif
61 64
 ifneq (,$(findstring cygwin, $(OS)))
... ...
@@ -74,9 +77,14 @@ endif
74 74
 endif
75 75
 
76 76
 ifeq ($(use_readline),1)
77
+ifneq (,$(findstring opt, $(readline_path)))
78
+	DEFS+=-DUSE_READLINE -I /opt/local/include
79
+	LIBS+=-L /opt/local/lib -lreadline -lncurses
80
+else
77 81
 	DEFS+=-DUSE_READLINE
78 82
 	LIBS+=-lreadline -lncurses
79 83
 endif
84
+endif
80 85
 
81 86
 
82 87
 include $(COREPATH)/Makefile.utils
... ...
@@ -92,7 +100,7 @@ $(info "to force readline support try 'make use_readline=1'")
92 92
 endif
93 93
 endif # ifeq (,$(quiet))
94 94
 
95
-$(NAME).o: 
95
+$(NAME).o:
96 96
 
97 97
 .PHONY: msg
98 98
 msg:
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- *
4 2
  * Copyright (C) 2006 iptelorg GmbH
5 3
  *
6 4
  * This file is part of kamailio, a free SIP server.
... ...
@@ -20,19 +18,13 @@
20 20
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 21
  * GNU General Public License for more details.
22 22
  *
23
- * You should have received a copy of the GNU General Public License 
24
- * along with this program; if not, write to the Free Software 
23
+ * You should have received a copy of the GNU General Public License
24
+ * along with this program; if not, write to the Free Software
25 25
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 26
  */
27 27
 /*
28 28
  * send commands using binrpc
29 29
  *
30
- * History:
31
- * --------
32
- *  2006-02-14  created by andrei
33
- *  2009-06-29  command line completion for cfg groups and vars (andrei)
34
- *  2009-06-30  command line completion for mi cmds (andrei)
35
- *  2010-08-08  command line completion for counters/statistic (andrei)
36 30
  */
37 31
 
38 32
 
... ...
@@ -68,10 +60,10 @@
68 68
 
69 69
 
70 70
 #ifndef NAME
71
-#define NAME    "sercmd"
71
+#define NAME    "kamcmd"
72 72
 #endif
73 73
 #ifndef VERSION
74
-#define VERSION "0.2"
74
+#define VERSION "1.5"
75 75
 #endif
76 76
 
77 77
 #define IOVEC_CNT 20
... ...
@@ -85,7 +77,6 @@
85 85
 #define UNIX_PATH_MAX 104
86 86
 #endif
87 87
 
88
-static char id[]="$Id$";
89 88
 static char version[]= NAME " " VERSION;
90 89
 #ifdef VERSION_NODATE
91 90
 static char compiled[] = "";
... ...
@@ -1793,7 +1784,6 @@ error:
1793 1793
 static int sercmd_ver(int s, struct binrpc_cmd* cmd)
1794 1794
 {
1795 1795
 	printf("%s\n", version);
1796
-	printf("%s\n", id);
1797 1796
 	printf("%s compiled on %s \n", __FILE__, compiled);
1798 1797
 #ifdef USE_READLINE
1799 1798
 	printf("interactive mode command completion support\n");
... ...
@@ -2198,7 +2188,6 @@ int main(int argc, char** argv)
2198 2198
 		switch(c){
2199 2199
 			case 'V':
2200 2200
 				printf("version: %s\n", version);
2201
-				printf("%s\n", id);
2202 2201
 				printf("%s compiled on %s \n", __FILE__,
2203 2202
 						compiled);
2204 2203
 				exit(0);