|
@@ -1,97 +0,0 @@
|
1
|
|
-From 25a2456845b341066adb5f9fcc553dec12a751b7 Mon Sep 17 00:00:00 2001
|
2
|
|
-From: Roger Wolff <R.E.Wolff@BitWizard.nl>
|
3
|
|
-Date: Fri, 5 Jul 2013 11:40:02 +0200
|
4
|
|
-Subject: [PATCH] glib dependency fixes.
|
5
|
|
-
|
6
|
|
----
|
7
|
|
- configure.ac | 32 ++++++++++++++------------------
|
8
|
|
- mtr.c | 5 +++++
|
9
|
|
- report.c | 2 ++
|
10
|
|
- 3 files changed, 21 insertions(+), 18 deletions(-)
|
11
|
|
-
|
12
|
|
---- a/configure.ac
|
13
|
|
-+++ b/configure.ac
|
14
|
|
-@@ -42,25 +42,22 @@ AC_ARG_WITH(gtk,
|
15
|
|
- [ --without-gtk Do not try to use GTK+ at all],
|
16
|
|
- WANTS_GTK=$withval, WANTS_GTK=yes)
|
17
|
|
-
|
18
|
|
--AC_ARG_WITH(glib,
|
19
|
|
--[ --without-glib Do not try to use glib at all],
|
20
|
|
--WANTS_GLIB=$withval, WANTS_GLIB=yes)
|
21
|
|
--
|
22
|
|
- AC_ARG_WITH([ipinfo],
|
23
|
|
- [ --without-ipinfo Do not try to use ipinfo lookup at all],
|
24
|
|
--[case "${withval}" in
|
25
|
|
-- yes) ipinfo=true ;;
|
26
|
|
-- no) ipinfo=false ;;
|
27
|
|
-- *) AC_MSG_ERROR([bad value ${withval} for --with-ipinfo]) ;;
|
28
|
|
--esac],[ipinfo=true])
|
29
|
|
--AM_CONDITIONAL([IPINFO], [test x$ipinfo = xtrue])
|
30
|
|
--if test "x$ipinfo" = "xfalse"; then
|
31
|
|
-- AC_DEFINE([NO_IPINFO], [1], [Define to disable ipinfo lookup])
|
32
|
|
--fi
|
33
|
|
-+[ipinfo="${withval}"], [ipinfo=yes])
|
34
|
|
-+AM_CONDITIONAL([IPINFO], [test x$ipinfo = xyes])
|
35
|
|
-
|
36
|
|
- AC_ARG_ENABLE(ipv6,
|
37
|
|
- [ --disable-ipv6 Do not enable IPv6],
|
38
|
|
- WANTS_IPV6=$enableval, WANTS_IPV6=yes)
|
39
|
|
-+
|
40
|
|
-+m4_ifndef([AM_PATH_GTK_2_0], [m4_defun([AM_PATH_GTK_2_0], [AC_MSG_ERROR([
|
41
|
|
-+ Could not locate the gtk2 automake macros, these are usually located in
|
42
|
|
-+ .../share/aclocal/gtk-2.0.m4
|
43
|
|
-+ Before running bootstrap try setting the environment variable
|
44
|
|
-+ ACLOCAL_PATH="/own/dir"
|
45
|
|
-+ or configure --without-gtk.
|
46
|
|
-+])])])
|
47
|
|
-
|
48
|
|
- if test "x$WANTS_GTK" = "xyes"; then
|
49
|
|
- AM_PATH_GTK_2_0(2.6.0, CFLAGS="$CFLAGS $GTK_CFLAGS"
|
50
|
|
-@@ -71,11 +68,10 @@ if test "x$WANTS_GTK" = "xyes"; then
|
51
|
|
- else
|
52
|
|
- AC_DEFINE(NO_GTK)
|
53
|
|
- GTK_OBJ=""
|
54
|
|
-- if test "x$WANTS_GLIB" = "xyes"; then
|
55
|
|
-- PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
56
|
|
-- else
|
57
|
|
-- AC_DEFINE(NO_GLIB, 1, [Define if you don't have the glib libraries available.])
|
58
|
|
-- fi
|
59
|
|
-+fi
|
60
|
|
-+
|
61
|
|
-+if test "x$ipinfo" = "xno"; then
|
62
|
|
-+ AC_DEFINE([NO_IPINFO], [1], [Define to disable ipinfo lookup])
|
63
|
|
- fi
|
64
|
|
-
|
65
|
|
- AC_CHECK_FUNC(socket, ,
|
66
|
|
---- a/mtr.c
|
67
|
|
-+++ b/mtr.c
|
68
|
|
-@@ -464,6 +464,11 @@ void parse_arg (int argc, char **argv)
|
69
|
|
- case 'z':
|
70
|
|
- ipinfo_no = 0;
|
71
|
|
- break;
|
72
|
|
-+#else
|
73
|
|
-+ case 'y':
|
74
|
|
-+ case 'z':
|
75
|
|
-+ fprintf( stderr, "IPINFO not enabled.\n" );
|
76
|
|
-+ break;
|
77
|
|
- #endif
|
78
|
|
- }
|
79
|
|
- }
|
80
|
|
---- a/report.c
|
81
|
|
-+++ b/report.c
|
82
|
|
-@@ -340,6 +340,7 @@ void csv_close(time_t now)
|
83
|
|
- snprint_addr(name, sizeof(name), addr);
|
84
|
|
-
|
85
|
|
- int last = net_last(at);
|
86
|
|
-+#ifndef NO_IPINFO
|
87
|
|
- if(!ipinfo_no) {
|
88
|
|
- char* fmtinfo = fmt_ipinfo(addr);
|
89
|
|
- if (fmtinfo != NULL) fmtinfo = trim(fmtinfo);
|
90
|
|
-@@ -349,6 +350,7 @@ void csv_close(time_t now)
|
91
|
|
- printf("MTR.%s;%lu;%s;%s;%d;%s;%d", MTR_VERSION, now, "OK", Hostname,
|
92
|
|
- at+1, name, last);
|
93
|
|
- }
|
94
|
|
-+#endif
|
95
|
|
-
|
96
|
|
- for( i=0; i<MAXFLD; i++ ) {
|
97
|
|
- j = fld_index[fld_active[j]];
|