summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@tox.im>2014-02-18 16:21:12 -0500
committerirungentoo <irungentoo@tox.im>2014-02-18 16:21:12 -0500
commitbd973152cc7d5b9f8385b6777883ed6ff1a573d7 (patch)
tree4710e3bb632101b5d812fe5e3423c494777d7963
parent62ef4ed95db2dd49824077adcb03251cd7c5c01b (diff)
parent7395bacd889bd29b2e1a7a8f806ed2a1fa2a336e (diff)
Merge pull request #742 from mannol1/master
Updated files with latest changes
-rw-r--r--.travis.yml44
-rw-r--r--INSTALL.md226
-rw-r--r--configure.ac33
3 files changed, 210 insertions, 93 deletions
diff --git a/.travis.yml b/.travis.yml
index 9d175564..b79c8ede 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,13 +14,13 @@ before_script:
14 - sudo make install >/dev/null 14 - sudo make install >/dev/null
15 - cd .. 15 - cd ..
16 #installing libconfig, needed for DHT_bootstrap_daemon 16 #installing libconfig, needed for DHT_bootstrap_daemon
17 - wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null 17 #- wget http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz > /dev/null
18 - tar -xvzf libconfig-1.4.9.tar.gz > /dev/null 18 #- tar -xvzf libconfig-1.4.9.tar.gz > /dev/null
19 - cd libconfig-1.4.9 19 #- cd libconfig-1.4.9
20 - ./configure > /dev/null 20 #- ./configure > /dev/null
21 - make -j3 > /dev/null 21 #- make -j3 > /dev/null
22 - sudo make install > /dev/null 22 #- sudo make install > /dev/null
23 - cd .. 23 #- cd ..
24 #installing libopus, needed for audio encoding/decoding 24 #installing libopus, needed for audio encoding/decoding
25 - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null 25 - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz > /dev/null
26 - tar xzvf opus-1.0.3.tar.gz > /dev/null 26 - tar xzvf opus-1.0.3.tar.gz > /dev/null
@@ -30,25 +30,25 @@ before_script:
30 - sudo make install > /dev/null 30 - sudo make install > /dev/null
31 - cd .. 31 - cd ..
32 #installing libsdl1.2, needed for displaying video frames 32 #installing libsdl1.2, needed for displaying video frames
33 - wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null 33 #- wget http://www.libsdl.org/release/SDL-1.2.15.tar.gz > /dev/null
34 - tar -xvzf SDL-1.2.15.tar.gz > /dev/null 34 #- tar -xvzf SDL-1.2.15.tar.gz > /dev/null
35 - cd SDL-1.2.15 35 #- cd SDL-1.2.15
36 - ./configure > /dev/null 36 #- ./configure > /dev/null
37 - make -j3 /dev/null 37 #- make -j3 /dev/null
38 - sudo make install > /dev/null 38 #- sudo make install > /dev/null
39 - cd .. 39 #- cd ..
40 #installing libopenal, needed for audio capture/playback 40 #installing libopenal, needed for audio capture/playback
41 - sudo apt-get install libopenal-dev > /dev/null 41 #- sudo apt-get install libopenal-dev > /dev/null
42 #installing yasm, needed for compiling ffmpeg 42 #installing yasm, needed for compiling ffmpeg
43 - sudo apt-get install yasm > /dev/null 43 - sudo apt-get install yasm > /dev/null
44 #installing ffmpeg, needed for capturing and encoding/decoding video 44 #installing ffmpeg, needed for capturing and encoding/decoding video
45 - wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null 45 #- wget https://www.ffmpeg.org/releases/ffmpeg-2.0.2.tar.gz > /dev/null
46 - tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null 46 #- tar -xvzf ffmpeg-2.0.2.tar.gz > /dev/null
47 - cd ffmpeg-2.0.2 47 #- cd ffmpeg-2.0.2
48 - ./configure > /dev/null 48 #- ./configure > /dev/null
49 - make -j3 >/dev/null 49 #- make -j3 >/dev/null
50 - sudo make install > /dev/null 50 #- sudo make install > /dev/null
51 - cd .. 51 #- cd ..
52 #installing vpx 52 #installing vpx
53 - git clone http://git.chromium.org/webm/libvpx.git > /dev/null 53 - git clone http://git.chromium.org/webm/libvpx.git > /dev/null
54 - cd libvpx 54 - cd libvpx
diff --git a/INSTALL.md b/INSTALL.md
index e82fe5bf..e7902149 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -7,6 +7,14 @@
7 - [Non-Homebrew](#non-homebrew) 7 - [Non-Homebrew](#non-homebrew)
8 - [Windows](#windows) 8 - [Windows](#windows)
9 9
10- [Additional](#additional)
11 - [Advanced configure options] (#aconf)
12 - [A/V support](#av)
13 - [libtoxav] (#libtoxav)
14 - [Test phone] (#phone)
15 - [Bootstrap daemon] (#bootstrapd)
16 - [nTox] (#ntox)
17
10<a name="installation" /> 18<a name="installation" />
11##Installation 19##Installation
12 20
@@ -20,18 +28,14 @@ Note: package fetching commands may vary by OS.
20On Ubuntu: 28On Ubuntu:
21 29
22```bash 30```bash
23sudo apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev checkinstall check git libswscale-dev libsdl-dev libopenal-dev libopus-dev libvpx-dev yasm 31sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm
24```
25If you get the "Unable to locate package libopus-dev" message, add the following ppa
26```bash
27sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade
28``` 32```
29 33
30On Fedora: 34On Fedora:
31 35
32```bash 36```bash
33yum groupinstall "Development Tools" 37yum groupinstall "Development Tools"
34yum install libtool autoconf automake libconfig-devel ncurses-devel check check-devel 38yum install libtool autoconf automake check check-devel
35``` 39```
36 40
37On SunOS: 41On SunOS:
@@ -73,22 +77,13 @@ make check
73sudo make install 77sudo make install
74cd .. 78cd ..
75``` 79```
80
76If your default prefix is /usr/local and you happen to get an error that says "error while loading shared libraries: libtoxcore.so.0: cannot open shared object file: No such file or directory", then you can try running ```sudo ldconfig```. If that doesn't fix it, run: 81If your default prefix is /usr/local and you happen to get an error that says "error while loading shared libraries: libtoxcore.so.0: cannot open shared object file: No such file or directory", then you can try running ```sudo ldconfig```. If that doesn't fix it, run:
77``` 82```
78echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf 83echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf
79sudo ldconfig 84sudo ldconfig
80``` 85```
81 86
82You also need recent [FFmpeg](https://git.videolan.org/?p=ffmpeg.git) libraries:
83```bash
84git clone git://source.ffmpeg.org/ffmpeg.git
85cd ffmpeg
86git checkout n2.0.2
87./configure --prefix=`pwd`/install --disable-programs
88make && make install
89cd ..
90```
91
92Then clone this repo and generate makefile: 87Then clone this repo and generate makefile:
93```bash 88```bash
94git clone git://github.com/irungentoo/ProjectTox-Core.git 89git clone git://github.com/irungentoo/ProjectTox-Core.git
@@ -98,17 +93,7 @@ autoreconf -i
98make 93make
99sudo make install 94sudo make install
100``` 95```
101Advance configure options: 96
102 - --prefix=/where/to/install
103 - --with-libsodium-headers=/path/to/libsodium/include/
104 - --with-libsodium-libs=/path/to/sodiumtest/lib/
105 - --enable-silent-rules less verbose build output (undo: "make V=1")
106 - --disable-silent-rules verbose build output (undo: "make V=0")
107 - --disable-tests build unit tests (default: auto)
108 - --disable-ntox build nTox client (default: auto)
109 - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
110 - --enable-shared[=PKGS] build shared libraries [default=yes]
111 - --enable-static[=PKGS] build static libraries [default=yes]
112 97
113<a name="osx" /> 98<a name="osx" />
114###OS X: 99###OS X:
@@ -153,17 +138,6 @@ make
153make install 138make install
154``` 139```
155 140
156Advance configure options:
157 - --prefix=/where/to/install
158 - --with-libsodium-headers=/path/to/libsodium/include/
159 - --with-libsodium-libs=/path/to/sodiumtest/lib/
160 - --enable-silent-rules less verbose build output (undo: "make V=1")
161 - --disable-silent-rules verbose build output (undo: "make V=0")
162 - --disable-tests build unit tests (default: auto)
163 - --disable-ntox build nTox client (default: auto)
164 - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
165 - --enable-shared[=PKGS] build shared libraries [default=yes]
166 - --enable-static[=PKGS] build static libraries [default=yes]
167 141
168<a name="non-homebrew" /> 142<a name="non-homebrew" />
169####Non-homebrew: 143####Non-homebrew:
@@ -173,7 +147,6 @@ Grab the following packages:
173 * https://gnu.org/software/autoconf/ 147 * https://gnu.org/software/autoconf/
174 * https://gnu.org/software/automake/ 148 * https://gnu.org/software/automake/
175 * https://github.com/jedisct1/libsodium 149 * https://github.com/jedisct1/libsodium
176 * http://www.hyperrealm.com/libconfig/
177 * http://check.sourceforge.net/ 150 * http://check.sourceforge.net/
178 151
179Uncompress and install them all. Make sure to follow the README as the instructions change, but they all follow the same pattern below: 152Uncompress and install them all. Make sure to follow the README as the instructions change, but they all follow the same pattern below:
@@ -186,7 +159,7 @@ sudo make install
186 159
187In your local TOX repository: 160In your local TOX repository:
188 161
189Then generate the makefile: 162Then generate makefile, build and install tox:
190```bash 163```bash
191cd ProjectTox-Core 164cd ProjectTox-Core
192autoreconf -i 165autoreconf -i
@@ -194,22 +167,11 @@ autoreconf -i
194make 167make
195make install 168make install
196``` 169```
197Advance configure options:
198 - --prefix=/where/to/install
199 - --with-libsodium-headers=/path/to/libsodium/include/
200 - --with-libsodium-libs=/path/to/sodiumtest/lib/
201 - --enable-silent-rules less verbose build output (undo: "make V=1")
202 - --disable-silent-rules verbose build output (undo: "make V=0")
203 - --disable-tests build unit tests (default: auto)
204 - --disable-ntox build nTox client (default: auto)
205 - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto)
206 - --enable-shared[=PKGS] build shared libraries [default=yes]
207 - --enable-static[=PKGS] build static libraries [default=yes]
208 170
209Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory 171Do not install them from macports (or any dependencies for that matter) as they get shoved in the wrong directory
210(or the wrong version gets installed) and make your life more annoying. 172(or the wrong version gets installed) and make your life more annoying.
211 173
212Another thing you may want to install is the latest gcc, this caused me a few problems as XCode from 4.3 174Another thing: you may want to install is the latest gcc. This caused me a few problems as XCode from 4.3
213no longer includes gcc and instead uses LLVM-GCC, a nice install guide can be found at 175no longer includes gcc and instead uses LLVM-GCC, a nice install guide can be found at
214http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42 176http://caiustheory.com/install-gcc-421-apple-build-56663-with-xcode-42
215 177
@@ -246,18 +208,166 @@ autoreconf -i
246make 208make
247make install 209make install
248``` 210```
249Advance configure options: 211
212<a name="Clients" />
213####Clients:
214While [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)
215
216
217
218
219
220<a name="additional" />
221##Additional
222
223
224
225<a name="aconf" />
226###Advanced configure options:
227
250 - --prefix=/where/to/install 228 - --prefix=/where/to/install
251 - --with-libsodium-headers=/path/to/libsodium/include/ 229 - --with-libsodium-headers=/path/to/libsodium/include/
252 - --with-libsodium-libs=/path/to/sodiumtest/lib/ 230 - --with-libsodium-libs=/path/to/sodiumtest/lib/
253 - --enable-silent-rules less verbose build output (undo: "make V=1") 231 - --enable-silent-rules less verbose build output (undo: "make V=1")
254 - --disable-silent-rules verbose build output (undo: "make V=0") 232 - --disable-silent-rules verbose build output (undo: "make V=0")
255 - --disable-tests build unit tests (default: auto) 233 - --disable-tests build unit tests (default: auto)
256 - --disable-ntox build nTox client (default: auto) 234 - --disable-av disable A/V support (default: auto) see: [libtoxav](#libtoxav)
257 - --disable-dht-bootstrap-daemon build DHT bootstrap daemon (default: auto) 235 - --enable-phone build phone (default: no) see: [Test phone](#phone)
236 - --enable-ntox build nTox client (default: no) see: [nTox](#ntox)
237 - --enable-daemon build DHT bootstrap daemon (default: no) see: [Bootstrap daemon](#bootstrapd)
258 - --enable-shared[=PKGS] build shared libraries [default=yes] 238 - --enable-shared[=PKGS] build shared libraries [default=yes]
259 - --enable-static[=PKGS] build static libraries [default=yes] 239 - --enable-static[=PKGS] build static libraries [default=yes]
260 240
261<a name="Clients" /> 241
262####Clients: 242<a name="av" />
263While [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) 243###A/V support:
244
245<a name="libtoxav" />
246####libtoxav:
247
248'libtoxav' is needed for A/V support and it's enabled by default. You can disable it by adding --disable-av argument to ./configure script like so:
249```bash
250./configure --disable-av
251```
252
253There are 2 dependencies required for libtoxav: libopus and libvpx. If they are not installed A/V support is dropped.
254
255Install on fedora:
256```bash
257yum install libopus-devel libvpx-devel
258```
259
260Install on ubuntu:
261```bash
262sudo apt-get install libopus-dev libvpx-dev
263```
264If you get the "Unable to locate package libopus-dev" message, add the following ppa and try again:
265```bash
266sudo add-apt-repository ppa:ubuntu-sdk-team/ppa && sudo apt-get update && sudo apt-get dist-upgrade
267```
268
269Install from source (example for most unix-like OS's):
270
271libvpx:
272```bash
273git clone http://git.chromium.org/webm/libvpx.git
274cd libvpx
275./configure
276make -j3
277sudo make install
278cd ..
279```
280
281libopus:
282```bash
283wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz
284tar xvzf opus-1.0.3.tar.gz
285cd opus-1.0.3
286./configure
287make -j3
288sudo make install
289cd ..
290```
291
292
293<a name="phone" />
294####Test phone:
295
296Test phone is disabled by default. You can enable it by adding --enable-phone argument to ./configure script like so:
297```bash
298./configure --enable-phone
299```
300It can be compiled with or without video capturing enabled. There are 4 dependencies for phone: openal, ffmpeg, sdl and swscale. If any of the later 3 are not installed video support is dropped.
301
302Install on fedora:
303```bash
304yum install libopenal-devel libswscale-devel SDL*
305```
306
307Install on ubuntu:
308```bash
309sudo apt-get install libopenal-dev libswscale-dev libsdl-dev
310```
311
312Now grap recent [FFmpeg](https://git.videolan.org/?p=ffmpeg.git) libraries and install them:
313```bash
314git clone git://source.ffmpeg.org/ffmpeg.git
315cd ffmpeg
316git checkout n2.0.2
317./configure --prefix=`pwd`/install --disable-programs
318make && make install
319cd ..
320```
321
322You are now ready to compile with phone!
323
324
325
326
327<a name="bootstrapd" />
328###Bootstrap daemon:
329
330Daemon is disabled by default. You can enable it by adding --enable-daemon argument to ./configure script like so:
331```bash
332./configure --enable-daemon
333```
334There is one dependency required for bootstrap daemon: libconfig.
335
336Install on fedora:
337```bash
338yum install libconfig-devel
339```
340
341Install on ubuntu:
342```bash
343sudo apt-get install libconfig-dev
344```
345
346OS X homebrew:
347```
348brew install libconfig
349```
350OS X non-homebrew:
351Grab the following [package] (http://www.hyperrealm.com/libconfig/), uncompress and install
352
353
354
355<a name="ntox" />
356###nTox test cli:
357
358nTox is disabled by default. You can enable it by adding --enable-ntox argument to ./configure script like so:
359```bash
360./configure --enable-ntox
361```
362There is one dependency required for nTox: libncurses.
363
364Install on fedora:
365```bash
366yum install ncurses-devel
367```
368
369Install on ubuntu:
370```bash
371sudo apt-get install ncurses-dev
372```
373
diff --git a/configure.ac b/configure.ac
index 2b4fad78..066c919a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,11 +32,11 @@ if test "x${prefix}" = "xNONE"; then
32 prefix="${ac_default_prefix}" 32 prefix="${ac_default_prefix}"
33fi 33fi
34 34
35BUILD_DHT_BOOTSTRAP_DAEMON="yes" 35BUILD_DHT_BOOTSTRAP_DAEMON="no"
36BUILD_NTOX="yes" 36BUILD_NTOX="no"
37BUILD_TESTS="yes" 37BUILD_TESTS="yes"
38BUILD_AV="yes" 38BUILD_AV="yes"
39BUILD_PHONE="yes" 39BUILD_PHONE="no"
40BUILD_TESTING="yes" 40BUILD_TESTING="yes"
41 41
42NCURSES_FOUND="no" 42NCURSES_FOUND="no"
@@ -57,25 +57,25 @@ AC_ARG_ENABLE([nacl],
57 57
58PKG_PROG_PKG_CONFIG 58PKG_PROG_PKG_CONFIG
59 59
60AC_ARG_ENABLE([av], 60AC_ARG_ENABLE([phone],
61 [AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ], 61 [AC_HELP_STRING([--enable-phone], [build test phone (default: auto)]) ],
62 [ 62 [
63 if test "x$enableval" = "xno"; then 63 if test "x$enableval" = "xno"; then
64 BUILD_AV="no"
65 BUILD_PHONE="no" 64 BUILD_PHONE="no"
66 elif test "x$enableval" = "xyes"; then 65 elif test "x$enableval" = "xyes"; then
67 BUILD_AV="yes" 66 BUILD_PHONE="yes"
68 fi 67 fi
69 ] 68 ]
70) 69)
71 70
72AC_ARG_ENABLE([phone], 71AC_ARG_ENABLE([av],
73 [AC_HELP_STRING([--disable-phone], [build test phone (default: auto)]) ], 72 [AC_HELP_STRING([--disable-av], [build AV support libraries (default: auto)]) ],
74 [ 73 [
75 if test "x$enableval" = "xno"; then 74 if test "x$enableval" = "xno"; then
75 BUILD_AV="no"
76 BUILD_PHONE="no" 76 BUILD_PHONE="no"
77 elif test "x$enableval" = "xyes"; then 77 elif test "x$enableval" = "xyes"; then
78 BUILD_PHONE="yes" 78 BUILD_AV="yes"
79 fi 79 fi
80 ] 80 ]
81) 81)
@@ -92,7 +92,7 @@ AC_ARG_ENABLE([tests],
92) 92)
93 93
94AC_ARG_ENABLE([ntox], 94AC_ARG_ENABLE([ntox],
95 [AC_HELP_STRING([--disable-ntox], [build nTox client (default: auto)]) ], 95 [AC_HELP_STRING([--enable-ntox], [build nTox client (default: auto)]) ],
96 [ 96 [
97 if test "x$enableval" = "xno"; then 97 if test "x$enableval" = "xno"; then
98 BUILD_NTOX="no" 98 BUILD_NTOX="no"
@@ -102,8 +102,8 @@ AC_ARG_ENABLE([ntox],
102 ] 102 ]
103) 103)
104 104
105AC_ARG_ENABLE([dht-bootstrap-daemon], 105AC_ARG_ENABLE([daemon],
106 [AC_HELP_STRING([--disable-dht-bootstrap-daemon], [build DHT bootstrap daemon (default: auto)]) ], 106 [AC_HELP_STRING([--enable-daemon], [build DHT bootstrap daemon (default: auto)]) ],
107 [ 107 [
108 if test "x$enableval" = "xno"; then 108 if test "x$enableval" = "xno"; then
109 BUILD_DHT_BOOTSTRAP_DAEMON="no" 109 BUILD_DHT_BOOTSTRAP_DAEMON="no"
@@ -345,6 +345,7 @@ AC_TYPE_UINT64_T
345AC_TYPE_UINT8_T 345AC_TYPE_UINT8_T
346AC_C_BIGENDIAN 346AC_C_BIGENDIAN
347 347
348
348# Checks for library functions. 349# Checks for library functions.
349AC_FUNC_FORK 350AC_FUNC_FORK
350AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc]) 351AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc])
@@ -430,6 +431,12 @@ if test "x$BUILD_PHONE" = "xyes"; then
430 ) 431 )
431fi 432fi
432 433
434#If all dependencies are here add support video define for phone.c
435if test "x$BUILD_PHONE" == "xyes"; then
436 #Set FFMpeg define
437 AC_DEFINE([TOX_FFMPEG], [1], [Support video])
438fi
439
433if test "x$BUILD_AV" = "xyes"; then 440if test "x$BUILD_AV" = "xyes"; then
434 PKG_CHECK_MODULES([OPUS], [opus], 441 PKG_CHECK_MODULES([OPUS], [opus],
435 [], 442 [],