From cb9a0a5ded31742a23b545919279686259d43945 Mon Sep 17 00:00:00 2001 From: Sean Qureshi Date: Sat, 24 Aug 2013 14:07:03 -0700 Subject: [PATCH 1/7] Updated INSTALL.md to list clients, improved options --- INSTALL.md | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 9a81fba7b..d67baef81 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -68,10 +68,14 @@ Advance configure options: - --prefix=/where/to/install - --with-libsodium-headers=/path/to/libsodium/include/ - --with-libsodium-libs=/path/to/sodiumtest/lib/ - - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - - --BUILD_NTOX="yes" - - --BUILD_TESTS="yes" - + - --enable-silent-rules less verbose build output (undo: "make V=1") + - --disable-silent-rules verbose build output (undo: "make V=0") + - --disable-tests build unit tests (default: auto) + - --disable-ntox build nTox client (default: auto) + - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) + - --enable-shared[=PKGS] build shared libraries [default=yes] + - --enable-static[=PKGS] build static libraries [default=yes] + ###OS X: You need the latest XCode with the Developer Tools (Preferences -> Downloads -> Command Line Tools). @@ -99,7 +103,13 @@ Advance configure options: - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - --BUILD_NTOX="yes" - --BUILD_TESTS="yes" - + - --enable-silent-rules less verbose build output (undo: "make V=1") + - --disable-silent-rules verbose build output (undo: "make V=0") + - --disable-tests build unit tests (default: auto) + - --disable-ntox build nTox client (default: auto) + - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) + - --enable-shared[=PKGS] build shared libraries [default=yes] + - --enable-static[=PKGS] build static libraries [default=yes] ####Non-homebrew: @@ -137,7 +147,13 @@ Advance configure options: - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - --BUILD_NTOX="yes" - --BUILD_TESTS="yes" - + - --enable-silent-rules less verbose build output (undo: "make V=1") + - --disable-silent-rules verbose build output (undo: "make V=0") + - --disable-tests build unit tests (default: auto) + - --disable-ntox build nTox client (default: auto) + - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) + - --enable-shared[=PKGS] build shared libraries [default=yes] + - --enable-static[=PKGS] build static libraries [default=yes] Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory (or the wrong version gets installed) and make your life more annoying. @@ -175,3 +191,14 @@ Advance configure options: - --BUILD_DHT_BOOTSTRAP_DAEMON="yes" - --BUILD_NTOX="yes" - --BUILD_TESTS="yes" + - --enable-silent-rules less verbose build output (undo: "make V=1") + - --disable-silent-rules verbose build output (undo: "make V=0") + - --disable-tests build unit tests (default: auto) + - --disable-ntox build nTox client (default: auto) + - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) + - --enable-shared[=PKGS] build shared libraries [default=yes] + - --enable-static[=PKGS] build static libraries [default=yes] + + +####Clients: +While [Toxic](https://github.com/tox/toxic) is no longer in core, a list of Tox clients are located in our [wiki](http://wiki.tox.im/client) From 4b6db8db7d016dcff205251add698a523535c262 Mon Sep 17 00:00:00 2001 From: Jman012 Date: Sat, 24 Aug 2013 19:42:58 -0700 Subject: [PATCH 2/7] Fixed display issue with INSTALL.md --- INSTALL.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index d67baef81..d14796f87 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -75,7 +75,8 @@ Advance configure options: - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - + + ###OS X: You need the latest XCode with the Developer Tools (Preferences -> Downloads -> Command Line Tools). @@ -110,6 +111,7 @@ Advance configure options: - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] + ####Non-homebrew: From 634a67f627a9691926186cd13ff93cb9d7ebd286 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Mon, 26 Aug 2013 02:18:09 +0300 Subject: [PATCH 3/7] Also generate a .dll in MinGW builds Previously only static a static library was produced on MinGW builds, this PR makes sure that we also build a proper .dll --- configure.ac | 1 + toxcore/Makefile.inc | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d11c396a1..0911f0d0a 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,7 @@ AC_ARG_WITH(libsodium-libs, # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL WIN32=no diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index 2fd93a224..90912a59c 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -34,7 +34,8 @@ libtoxcore_la_CFLAGS = -I$(top_srcdir) \ $(LIBSODIUM_CFLAGS) libtoxcore_la_LDFLAGS = -version-info $(LIBTOXCORE_VERSION) \ - $(LIBSODIUM_LDFLAGS) - -libtoxcore_la_LIBS = $(LIBSODIUM_LIBS) \ + -no-undefined \ + $(LIBSODIUM_LDFLAGS) \ $(WINSOCK2_LIBS) + +libtoxcore_la_LIBS = $(LIBSODIUM_LIBS) From 2fa0b69631157f083182f3ca0ca3d6648d08e45b Mon Sep 17 00:00:00 2001 From: jin-eld Date: Mon, 26 Aug 2013 14:34:42 +0300 Subject: [PATCH 4/7] Add /usr/local/* to search paths on FreeBSD Seems that on FreeBSD those directories are not in the default search paths, so we'll have to add them manually. --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 0911f0d0a..3a0fd0ab4 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,11 @@ case $host_os in *solaris*) LIBS="$LIBS -lssp -lsocket -lnsl" ;; + *freebsd*) + LDFLAGS="$LDFLAGS -L/usr/local/lib" + CFLAGS="$CFLAGS -I/usr/local/include" + CPPFLAGS="$CPPFLAGS -I/usr/local/include" + ;; esac AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") From 7ce599d1807d0d8e2e86f9691f52a59b48f2c9e6 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Mon, 26 Aug 2013 22:08:33 +0300 Subject: [PATCH 5/7] Fix trailing whitespace --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3a0fd0ab4..285c3ac50 100644 --- a/configure.ac +++ b/configure.ac @@ -137,7 +137,7 @@ else AC_CHECK_LIB(sodium, randombytes_random, [], [ - AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) + AC_MSG_ERROR([required library libsodium was not found on your system, please check http://download.libsodium.org/libsodium/releases/]) ] ) fi From ed1c130ebced51e48b2a8c600e5f7e68fc54dd85 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Mon, 26 Aug 2013 22:08:43 +0300 Subject: [PATCH 6/7] Move extra libtool options into configure This should allow to keep the libtool options all in one place and at the same time define different options depending on the host. Made sure that -no-undefined is set only on Win32. Although no side effects on Linux and OSX have been observed so far, it's probably better to play it safe; it does not seem to be needed/does not seem to matter on *nix, only required for Win32. --- configure.ac | 14 ++++++++++++++ toxcore/Makefile.inc | 5 +---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 285c3ac50..64d53dec9 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,17 @@ AM_INIT_AUTOMAKE([1.10 -Wall]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) +LIBTOXCORE_LT_VERSION=0:0:0 +dnl +dnl current:revision:age +dnl +dnl current: increment if interfaces have been added, removed or changed +dnl revision: increment if source code has changed, set to zero if current is +dnl incremented +dnl age: increment if interfaces have been added, set to zero if +dnl interfaces have been removed or changed +EXTRA_LT_LDFLAGS="-version-info $LIBTOXCORE_LT_VERSION" + if test "x${prefix}" = "xNONE"; then prefix="${ac_default_prefix}" fi @@ -106,6 +117,7 @@ case $host_os in WIN32="yes" AC_MSG_WARN([nTox is not supported on $host_os yet, disabling]) BUILD_NTOX="no" + EXTRA_LT_LDFLAGS="$EXTRA_LT_LDFLAGS -no-undefined" ;; *solaris*) LIBS="$LIBS -lssp -lsocket -lnsl" @@ -118,6 +130,8 @@ case $host_os in esac AM_CONDITIONAL(WIN32, test "x$WIN32" = "xyes") +AC_SUBST(EXTRA_LT_LDFLAGS) + # Checks for libraries. LIBSODIUM_LIBS= LIBSODIUM_LDFLAGS= diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index 90912a59c..da07db41f 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -1,5 +1,3 @@ -LIBTOXCORE_VERSION = 0:0:0 - lib_LTLIBRARIES = libtoxcore.la libtoxcore_la_include_HEADERS = \ @@ -33,8 +31,7 @@ libtoxcore_la_CFLAGS = -I$(top_srcdir) \ -I$(top_srcdir)/toxcore \ $(LIBSODIUM_CFLAGS) -libtoxcore_la_LDFLAGS = -version-info $(LIBTOXCORE_VERSION) \ - -no-undefined \ +libtoxcore_la_LDFLAGS = $(EXTRA_LT_LDFLAGS) \ $(LIBSODIUM_LDFLAGS) \ $(WINSOCK2_LIBS) From f792b1be1f05caa78f5d1cb89e7860751f698910 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Mon, 26 Aug 2013 23:21:45 +0300 Subject: [PATCH 7/7] Tune automake options to avoid problems with newer versions Automake >1.14 complains if makefiles are used in subdirs but the subdir-objects option is not set. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 7824ecb0b..119b87866 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS = build ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = subdir-objects pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(top_builddir)/libtoxcore.pc