From 8d40ddf41727a9022f32531c0a1cc85536db9836 Mon Sep 17 00:00:00 2001 From: BtbN Date: Mon, 7 Oct 2013 01:58:57 +0200 Subject: [PATCH] Some configuration/build fixes, so building basicaly everything else than the library can be disabled --- INSTALL | 15 ++++++++++----- autogen.sh | 0 configure.ac | 16 ++++++++++++++-- other/Makefile.inc | 6 +++++- testing/Makefile.inc | 4 ++++ 5 files changed, 33 insertions(+), 8 deletions(-) mode change 100644 => 100755 autogen.sh diff --git a/INSTALL b/INSTALL index 7d1c323b..007e9396 100644 --- a/INSTALL +++ b/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, +Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -226,6 +226,11 @@ order to use an ANSI C compiler: and if that doesn't work, install pre-built binaries of GCC for HP-UX. + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended @@ -304,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -362,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 diff --git a/configure.ac b/configure.ac index 762736df..81f15eca 100644 --- a/configure.ac +++ b/configure.ac @@ -28,6 +28,7 @@ fi BUILD_DHT_BOOTSTRAP_DAEMON="yes" BUILD_NTOX="yes" BUILD_TESTS="yes" +BUILD_TESTING="yes" NCURSES_FOUND="no" LIBCONFIG_FOUND="no" @@ -35,7 +36,7 @@ LIBCHECK_FOUND="no" WANT_NACL="no" AC_ARG_ENABLE([nacl], - [AC_HELP_STRING([--enable-tests], [use nacl instead of libsodium (default: disabled)]) ], + [AC_HELP_STRING([--enable-nacl], [use nacl instead of libsodium (default: disabled)]) ], [ if test "x$enableval" = "xno"; then WANT_NACL="no" @@ -78,6 +79,17 @@ AC_ARG_ENABLE([dht-bootstrap-daemon], ] ) +AC_ARG_ENABLE([testing], + [AC_HELP_STRING([--disable-testing], [build various testing tools (default: auto)]) ], + [ + if test "x$enableval" = "xno"; then + BUILD_TESTING="no" + elif test "x$enableval" = "xyes"; then + BUILD_TESTING="yes" + fi + ] +) + DEPSEARCH= LIBSODIUM_SEARCH_HEADERS= LIBSODIUM_SEARCH_LIBS= @@ -460,9 +472,9 @@ if test "x$WIN32" = "xyes"; then fi AM_CONDITIONAL(BUILD_DHT_BOOTSTRAP_DAEMON, test "x$BUILD_DHT_BOOTSTRAP_DAEMON" = "xyes") - AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes") AM_CONDITIONAL(BUILD_NTOX, test "x$BUILD_NTOX" = "xyes") +AM_CONDITIONAL(BUILD_TESTING, test "x$BUILD_TESTING" = "xyes") AC_CONFIG_FILES([Makefile build/Makefile diff --git a/other/Makefile.inc b/other/Makefile.inc index 736678fd..5308c45d 100644 --- a/other/Makefile.inc +++ b/other/Makefile.inc @@ -1,4 +1,6 @@ -noinst_PROGRAMS += DHT_bootstrap +if BUILD_DHT_BOOTSTRAP_DAEMON + +bin_PROGRAMS += DHT_bootstrap DHT_bootstrap_SOURCES = ../other/DHT_bootstrap.c \ ../toxcore/DHT.h \ @@ -15,5 +17,7 @@ DHT_bootstrap_LDADD = $(LIBSODIUM_LDFLAGS) \ $(NACL_LIBS) \ $(WINSOCK2_LIBS) +endif + EXTRA_DIST += $(top_srcdir)/other/DHTservers \ $(top_srcdir)/other/tox.png diff --git a/testing/Makefile.inc b/testing/Makefile.inc index 65f9f64c..de3995be 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc @@ -19,6 +19,8 @@ nTox_LDADD = $(LIBSODIUM_LDFLAGS) \ endif +if BUILD_TESTING + noinst_PROGRAMS += DHT_test \ Lossless_UDP_testclient \ Lossless_UDP_testserver \ @@ -116,3 +118,5 @@ tox_sync_LDADD = \ $(WINSOCK2_LIBS) EXTRA_DIST += $(top_srcdir)/testing/misc_tools.c + +endif