[vinagre] Changed a bit the logic for local/non-local ifaddrs.h



commit c4479380b45180e83f7a92f631dd5be7a8e7789c
Author: Jonh Wendell <jwendell gnome org>
Date:   Thu Apr 29 11:22:47 2010 -0300

    Changed a bit the logic for local/non-local ifaddrs.h

 configure.ac                              |    4 ++++
 plugins/vnc/Makefile.am                   |    2 +-
 plugins/vnc/{ => if}/getifaddrs.c         |    0
 plugins/vnc/{ => if}/ifaddrs.h            |    0
 plugins/vnc/vinagre-vnc-listener-dialog.c |    6 +++++-
 5 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 990356a..3cd8c49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,10 @@ dnl *** Checks for ifaddrs.h ***
 dnl ****************************
 AC_CHECK_HEADER(ifaddrs.h)
 AM_CONDITIONAL(SELF_IFADDRS, test "x$ac_cv_header_ifaddrs_h" != "xyes")
+if test "x$ac_cv_header_ifaddrs_h" = "xyes"; then
+  AC_DEFINE(HAVE_IFADDRS_H, [1], [Define if we have system ifaddrs.h])
+fi
+
 
 dnl active plugins for vinagre.schemas
 ACTIVE_PLUGINS="vnc"
diff --git a/plugins/vnc/Makefile.am b/plugins/vnc/Makefile.am
index 7817e0b..e83fd5c 100644
--- a/plugins/vnc/Makefile.am
+++ b/plugins/vnc/Makefile.am
@@ -18,7 +18,7 @@ libvnc_la_SOURCES = 						\
 	vinagre-vnc-tunnel.h vinagre-vnc-tunnel.c
 
 if SELF_IFADDRS
-libvnc_la_SOURCES += ifaddrs.h getifaddrs.c
+libvnc_la_SOURCES += if/ifaddrs.h if/getifaddrs.c
 endif
 
 libvnc_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
diff --git a/plugins/vnc/getifaddrs.c b/plugins/vnc/if/getifaddrs.c
similarity index 100%
rename from plugins/vnc/getifaddrs.c
rename to plugins/vnc/if/getifaddrs.c
diff --git a/plugins/vnc/ifaddrs.h b/plugins/vnc/if/ifaddrs.h
similarity index 100%
rename from plugins/vnc/ifaddrs.h
rename to plugins/vnc/if/ifaddrs.h
diff --git a/plugins/vnc/vinagre-vnc-listener-dialog.c b/plugins/vnc/vinagre-vnc-listener-dialog.c
index ac7781e..6da6902 100644
--- a/plugins/vnc/vinagre-vnc-listener-dialog.c
+++ b/plugins/vnc/vinagre-vnc-listener-dialog.c
@@ -18,14 +18,18 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
+
 #include <net/if.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
+
 #ifdef HAVE_IFADDRS_H
 #include <ifaddrs.h>
 #else
-#include "ifaddrs.h"
+#include "if/ifaddrs.h"
 #endif
+
 #include <string.h>
 #include <glib/gi18n.h>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]