From a463e3a27305a5b2568145b63b68c90a55643be2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 19 Mar 2012 14:53:13 +0000 Subject: [PATCH] add configure option --enable-javaports to open ports of services with Java bindings by default (#2228) --- configure.ac | 24 +++++++++++++++++++++++- src/core/core.conf.in | 2 +- src/dht/dht.conf.in | 2 +- src/nse/nse.conf.in | 2 +- src/statistics/statistics.conf.in | 2 +- 5 files changed, 27 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 825d8c7ff..3d549568b 100644 --- a/configure.ac +++ b/configure.ac @@ -172,6 +172,7 @@ AC_SUBST(DEFAULT_INTERFACE) # sockets in default configuratin: AC_SUBST(UNIXONLY) + AC_MSG_CHECKING([for build target]) AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin") AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin") @@ -777,12 +778,27 @@ AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) # should expensive tests be run? AC_MSG_CHECKING(whether to run expensive tests) AC_ARG_ENABLE([expensivetests], - [AS_HELP_STRING([--enable-expensive-tests], [enable running expensive testcases])], + [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])], [enable_expensive=${enableval}], [enable_expensive=no]) AC_MSG_RESULT($enable_expensive) AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"]) +# should ports be open for Java services? +AC_MSG_CHECKING(whether to enable ports for gnunet-java) +AC_ARG_ENABLE([javaports], + [AS_HELP_STRING([--enable-javaports], [use non-zero ports for services with Java bindings (default is NO)])], + [enable_java_ports=${enableval}], + [enable_java_ports=no]) +AC_MSG_RESULT($enable_java_ports) +if test "x$enable_java_ports" = "xyes" +then + JAVAPORT="" +else + JAVAPORT="$UNIXONLY" +fi +AC_SUBST(JAVAPORT) + # should benchmarks be run? AC_MSG_CHECKING(whether to run benchmarks during make check) AC_ARG_ENABLE([benchmarks], @@ -930,6 +946,12 @@ then AC_MSG_NOTICE([NOTICE: sqlite not found. sqLite support will not be compiled.]) fi +# java ports +if test "x$enable_java_ports" = "xyes" +then + AC_MSG_NOTICE([NOTICE: opening ports for gnunet-java bindings by default.]) +fi + if test "x$lmhd" != "x1" then AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.]) diff --git a/src/core/core.conf.in b/src/core/core.conf.in index 84e2df9fb..61ac84e6c 100644 --- a/src/core/core.conf.in +++ b/src/core/core.conf.in @@ -1,6 +1,6 @@ [core] AUTOSTART = YES -@UNIXONLY@ PORT = 2092 +@JAVAPORT@PORT = 2092 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/dht/dht.conf.in b/src/dht/dht.conf.in index 17c13e93e..59581dc7b 100644 --- a/src/dht/dht.conf.in +++ b/src/dht/dht.conf.in @@ -1,6 +1,6 @@ [dht] AUTOSTART = YES -@UNIXONLY@ PORT = 2095 +@JAVAPORT@PORT = 2095 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/nse/nse.conf.in b/src/nse/nse.conf.in index b04f5acfe..bc49e051d 100644 --- a/src/nse/nse.conf.in +++ b/src/nse/nse.conf.in @@ -1,6 +1,6 @@ [nse] AUTOSTART = YES -@UNIXONLY@ PORT = 2097 +@JAVAPORT@PORT = 2097 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG diff --git a/src/statistics/statistics.conf.in b/src/statistics/statistics.conf.in index 4482b0f11..5de9dedea 100644 --- a/src/statistics/statistics.conf.in +++ b/src/statistics/statistics.conf.in @@ -1,6 +1,6 @@ [statistics] AUTOSTART = YES -@UNIXONLY@ PORT = 2088 +@JAVAPORT@PORT = 2088 HOSTNAME = localhost HOME = $SERVICEHOME CONFIG = $DEFAULTCONFIG -- 2.25.1