[Pkg-privacy-commits] [onioncat] 70/241: add configurable #defines in configure.ac

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 26 16:16:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch upstream-master
in repository onioncat.

commit 85efb41243a2775724ac5b57f38d4b8442b3cfa3
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date:   Wed Oct 29 18:18:08 2008 +0000

    add configurable #defines in configure.ac
    
    git-svn-id: https://www.cypherpunk.at/svn/onioncat/trunk@342 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
 config.h.in     |  9 +++++++++
 configure       | 31 +++++++++++++++++++++++++++++++
 configure.ac    |  4 ++++
 src/ocat.h      |  1 -
 src/ocatroute.c |  3 ---
 5 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/config.h.in b/config.h.in
index 0e776d7..3f01aee 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,5 +1,11 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* enable debugging */
+#undef DEBUG
+
+/* enable handling of accidental HTTP requests */
+#undef HANDLE_HTTP
+
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
@@ -78,6 +84,9 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* enable packet logging */
+#undef PACKET_LOG
+
 /* Version number of package */
 #undef VERSION
 
diff --git a/configure b/configure
index d380bd1..44155ca 100755
--- a/configure
+++ b/configure
@@ -1239,6 +1239,9 @@ if test -n "$ac_init_help"; then
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-debug          enable debugging
+  --enable-packet-log     enable packet logging
+  --enable-handle-http    enable handling of accidental HTTP requests
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
 
@@ -2172,6 +2175,34 @@ ac_config_headers="$ac_config_headers config.h"
 CFLAGS=-Wall
 
 
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug;
+cat >>confdefs.h <<\_ACEOF
+#define DEBUG
+_ACEOF
+
+fi
+
+# Check whether --enable-packet-log was given.
+if test "${enable_packet_log+set}" = set; then
+  enableval=$enable_packet_log;
+cat >>confdefs.h <<\_ACEOF
+#define PACKET_LOG
+_ACEOF
+
+fi
+
+# Check whether --enable-handle-http was given.
+if test "${enable_handle_http+set}" = set; then
+  enableval=$enable_handle_http;
+cat >>confdefs.h <<\_ACEOF
+#define HANDLE_HTTP
+_ACEOF
+
+fi
+
+
 # Checks for programs.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
diff --git a/configure.ac b/configure.ac
index 04b8ae2..c5d6a4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,10 @@ AC_CONFIG_HEADERS([config.h])
 
 AC_SUBST([CFLAGS], [-Wall])
 
+AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [enable debugging]), AC_DEFINE([DEBUG], [], [enable debugging]))
+AC_ARG_ENABLE([packet-log], AC_HELP_STRING([--enable-packet-log], [enable packet logging]), AC_DEFINE([PACKET_LOG], [], [enable packet logging]))
+AC_ARG_ENABLE([handle-http], AC_HELP_STRING([--enable-handle-http], [enable handling of accidental HTTP requests]), AC_DEFINE([HANDLE_HTTP], [], [enable handling of accidental HTTP requests]))
+
 # Checks for programs.
 AC_PROG_CC
 #AC_PROG_INSTALL
diff --git a/src/ocat.h b/src/ocat.h
index b655132..410fa6f 100644
--- a/src/ocat.h
+++ b/src/ocat.h
@@ -303,7 +303,6 @@ extern OcatThread_t *octh_;
 /* ocatlog.c */
 int open_connect_log(const char*);
 void log_msg(int, const char *, ...);
-#define DEBUG
 #ifdef DEBUG
 #define log_debug(x...) log_msg(L_DEBUG, ## x)
 #else
diff --git a/src/ocatroute.c b/src/ocatroute.c
index 839c133..b4b1ddd 100644
--- a/src/ocatroute.c
+++ b/src/ocatroute.c
@@ -238,7 +238,6 @@ void cleanup_socket(int fd, OcatPeer_t *peer)
 }
 
 
-#define HANDLE_HTTP
 #ifdef HANDLE_HTTP
 #define BSTRLEN 1024
 
@@ -855,8 +854,6 @@ void *socks_connector(void *p)
 }
 
 
-#define PACKET_LOG
-
 void packet_forwarder(void)
 {
    char buf[FRAME_SIZE];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git



More information about the Pkg-privacy-commits mailing list