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

[or-cvs] r10080: More attempt to fix win32 building. This time, with extra li (in tor/trunk: . src/common src/or src/tools)



Author: nickm
Date: 2007-04-30 21:36:32 -0400 (Mon, 30 Apr 2007)
New Revision: 10080

Modified:
   tor/trunk/
   tor/trunk/configure.in
   tor/trunk/src/common/log.c
   tor/trunk/src/or/Makefile.am
   tor/trunk/src/tools/Makefile.am
Log:
 r12607@catbus:  nickm | 2007-04-30 21:36:28 -0400
 More attempt to fix win32 building.  This time, with extra linking.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12607] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in	2007-05-01 01:10:50 UTC (rev 10079)
+++ tor/trunk/configure.in	2007-05-01 01:36:32 UTC (rev 10080)
@@ -163,12 +163,14 @@
 dnl Where do you live, libevent?  And how do we call you?
 
 if test $bwin32 = true; then
-  WS32lib=-lws2_32
-  GDIlib=-lgdi32
+  TOR_LIB_WS32=-lws2_32
+  TOR_LIB_GDI=-lgdi32
 else
-  W32lib=
-  GDIlib=
+  TOR_LIB_WS32=
+  TOR_LIB_GDI=
 fi
+AC_SUBST(TOR_LIB_WS32)
+AC_SUBST(TOR_LIB_GDI)
 
 dnl This is a disgusting hack so we safely include recent libevent headers.
 AC_CHECK_TYPE(u_int64_t, unsigned long long)
@@ -176,20 +178,12 @@
 AC_CHECK_TYPE(u_int16_t, unsigned short)
 AC_CHECK_TYPE(u_int8_t, unsigned char)
 
-if test $bwin32 = true; then
-  WS32lib=-lws2_32
-  GDIlib=-lgdi32
-else
-  W32lib=
-  GDIlib=
-fi
-
 tor_libevent_pkg_redhat="libevent"
 tor_libevent_pkg_debian="libevent"
 tor_libevent_devpkg_redhat="libevent-devel"
 tor_libevent_devpkg_debian="libevent-dev"
 
-TOR_SEARCH_LIBRARY(libevent, $trylibeventdir, [-levent $WS32lib], [
+TOR_SEARCH_LIBRARY(libevent, $trylibeventdir, [-levent $TOR_LIB_WS32], [
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/types.h>
@@ -213,7 +207,7 @@
 tor_openssl_devpkg_redhat="openssl-devel"
 tor_openssl_devpkg_debian="libssl-dev"
 
-TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $GDIlib],
+TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI],
     [#include <openssl/rand.h>],
     [void RAND_add(const void *buf, int num, double entropy);],
     [RAND_add((void*)0,0,0); exit(0);], [--with-ssl-dir],

Modified: tor/trunk/src/common/log.c
===================================================================
--- tor/trunk/src/common/log.c	2007-05-01 01:10:50 UTC (rev 10079)
+++ tor/trunk/src/common/log.c	2007-05-01 01:36:32 UTC (rev 10080)
@@ -652,6 +652,7 @@
 void
 suppress_libevent_log_msg(const char *msg)
 {
+  (void)msg;
 }
 #endif
 

Modified: tor/trunk/src/or/Makefile.am
===================================================================
--- tor/trunk/src/or/Makefile.am	2007-05-01 01:10:50 UTC (rev 10079)
+++ tor/trunk/src/or/Makefile.am	2007-05-01 01:36:32 UTC (rev 10080)
@@ -13,9 +13,8 @@
 	eventdns.c \
 	tor_main.c
 
-tor_LIBS = -lz -levent -lssl -lcrypto
 tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@ \
-        -lz -levent -lssl -lcrypto
+        -lz -levent -lssl -lcrypto @TOR_LIB_WS32@ @TOR_LIB_GDI@
 tor_LDADD = ../common/libor.a ../common/libor-crypto.a
 
 test_SOURCES = buffers.c circuitbuild.c circuitlist.c \
@@ -28,7 +27,8 @@
 	test.c
 
 test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
-        @TOR_LDFLAGS_libevent@ -lz -levent -lssl -lcrypto
+        @TOR_LDFLAGS_libevent@ -lz -levent -lssl -lcrypto \
+        @TOR_LIB_WS32@ @TOR_LIB_GDI@
 test_LDADD = ../common/libor.a ../common/libor-crypto.a
 
 noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i
@@ -36,7 +36,7 @@
 tor_main.o: micro-revision.i
 
 micro-revision.i: FORCE
-	@if test -d ../../.svn ; then 				\
+	@if test -d ../../.svn -a x`which svn` != x ; then	\
 	  svn info ../.. |              			\
 	  sed -n 's/^Revision: \([0-9][0-9]*\).*/"\1"/p' > micro-revision.i \
 	     || true;                                           \

Modified: tor/trunk/src/tools/Makefile.am
===================================================================
--- tor/trunk/src/tools/Makefile.am	2007-05-01 01:10:50 UTC (rev 10079)
+++ tor/trunk/src/tools/Makefile.am	2007-05-01 01:36:32 UTC (rev 10080)
@@ -1,10 +1,11 @@
 bin_PROGRAMS = tor-resolve tor-gencert
 
 tor_resolve_SOURCES = tor-resolve.c
-tor_resolve_LDFLAGS = @TOR_LDFLAGS_libevent@ -levent
+tor_resolve_LDFLAGS = @TOR_LDFLAGS_libevent@ -levent @TOR_LIB_WS32@
 tor_resolve_LDADD = ../common/libor.a
 
 tor_gencert_SOURCES = tor-gencert.c
 tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \
-        @TOR_LDFLAGS_libevent@ -lz -lcrypto -levent
+        @TOR_LDFLAGS_libevent@ -lz -lcrypto -levent \
+        @TOR_LIB_WS32@ @TOR_LIB_GDI@
 tor_gencert_LDADD = ../common/libor.a ../common/libor-crypto.a