]> git.meshlink.io Git - meshlink/commitdiff
Don't use AM_CONDITIONAL for CURSES.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 24 Jun 2011 22:06:06 +0000 (00:06 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 24 Jun 2011 22:06:06 +0000 (00:06 +0200)
For some reason, this doesn't work when cross-compiling for Windows.

m4/curses.m4
src/Makefile.am
src/top.c

index 408ae282424f8e6d40261e084b83e883d9c5a7fb..50a90a5a57030934d5d23d2e0db80b38e7d89142 100644 (file)
@@ -38,5 +38,4 @@ AC_DEFUN([tinc_CURSES],
   ])
 
   AC_SUBST(CURSES_LIBS)
-  AM_CONDITIONAL(CURSES, test "$curses" = true)
 ])
index 60709fb73c5b9248892a6b8f1d8e23a5dfe72fee..4f7c3c88b6a8b6160fad0b160183b1d42ba2a984 100644 (file)
@@ -12,16 +12,13 @@ tincd_SOURCES = \
 
 tincctl_SOURCES = \
        utils.c getopt.c getopt1.c dropin.c \
-       list.c tincctl.c rsagen.c
+       list.c tincctl.c rsagen.c top.c
 
 if TUNEMU
 tincd_SOURCES += bsd/tunemu.c
 endif
 
-if CURSES
-tincctl_SOURCES += top.c
 tincctl_LDADD = $(CURSES_LIBS)
-endif
 
 nodist_tincd_SOURCES = device.c
 
@@ -32,7 +29,7 @@ INCLUDES = @INCLUDES@ -I$(top_builddir)
 noinst_HEADERS = \
        xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
        buffer.h cipher.h conf.h connection.h control.h control_common.h crypto.h device.h digest.h edge.h graph.h logger.h meta.h net.h netutl.h node.h process.h \
-       protocol.h route.h rsa.h rsagen.h subnet.h bsd/tunemu.h
+       protocol.h route.h rsa.h rsagen.h subnet.h top.h bsd/tunemu.h
 
 LIBS = @LIBS@ @LIBGCRYPT_LIBS@
 
index b71bcb855cd9e817a46d02300a25ff391125207e..a457e0803c9b12c2cbb8c39a300aa70e2e30fc2c 100644 (file)
--- a/src/top.c
+++ b/src/top.c
@@ -19,6 +19,8 @@
 
 #include "system.h"
 
+#ifdef HAVE_CURSES
+
 #include <curses.h>
 
 #include "control_common.h"
@@ -310,3 +312,5 @@ void top(int fd) {
 
        endwin();
 }
+
+#endif