Commit graph

69 commits

Author SHA1 Message Date
thorkill
c20b8ce5dd -Werror=format breaks configure (asprintf) 2017-01-31 15:48:05 +01:00
thorkill
4b3c0aea78 Merge remote-tracking branch 'guus/1.1' into thkr-20170131-merge 2017-01-31 15:44:02 +01:00
Guus Sliepen
172763f4af Add -Wall to CFLAGS. 2016-06-22 17:35:12 +02:00
thorkill
68beb519b4 Turn -Wformat to -Werror=format, got some wrong habits 2016-05-17 23:34:07 +02:00
thorkill
4be26caf4e Merge remote-tracking branch 'guus/1.1' into thkr-foor2Vup 2016-05-08 15:58:29 +02:00
Guus Sliepen
8afb52a39a Fix conditional checking of tun/tap headers on DragonFly BSD. 2016-04-15 14:27:52 +02:00
Guus Sliepen
3cceae93f6 Make some platform-specific header checks conditional.
Don't check for linux/if_tun.h on BSD platforms for example.
2016-04-14 23:53:13 +02:00
Guus Sliepen
d10834e920 Remove support for Windows 2000 and anything that doesn't support getaddrinfo(). 2016-04-14 23:32:50 +02:00
Guus Sliepen
615ecb7a8a Remove checks for non-C99 compliant compilers. 2016-04-14 23:13:49 +02:00
Guus Sliepen
46ebfbb6eb Use getcwd() instead of get_current_dir_name(). 2016-04-14 17:29:25 +02:00
Guus Sliepen
b5b04910b9 Replace usleep() with nanosleep(). 2016-04-14 17:21:47 +02:00
Guus Sliepen
34ea20af73 Remove checks for headers and functions that are in C99. 2016-04-14 17:03:01 +02:00
Guus Sliepen
9527622abc Enable silent builds by default.
Cleaner build messages make it easier to spot compiler warnings and errors.
Use make V=1 to get the verbose output back.

# Conflicts:
#	configure.ac
#	doc/Makefile.am
2016-04-11 15:07:23 +02:00
Guus Sliepen
d7f6737cfc Update support for BSD tun/tap devices, add support for OS X utun interfaces. 2016-04-11 14:49:51 +02:00
Guus Sliepen
9f0fb224a6 Don't compile getopt*.c if the system provides getopt_long().
# Conflicts:
#	configure.ac
#	src/Makefile.am
#	src/tincd.c
2016-04-10 16:47:32 +02:00
Guus Sliepen
ac9e32ff91 Use nostdinc instead of overriding DEFAULT_INCLUDES. 2016-02-28 15:48:19 +01:00
Guus Sliepen
96dd6e5f6c Only check for -fno-strict-overflow if -fwrapv does not work. 2016-02-28 15:42:04 +01:00
thorkill
07ec2d2eb2 Merge remote-tracking branch 'remotes/guus/1.1' into thkr-1.1-ponyhof 2015-12-10 17:08:29 +01:00
Guus Sliepen
e4fd81ed2d Add support for recvmmsg().
Based on a patch from Samuel Thibault and input from Michael Tokarev.
2015-12-10 16:36:10 +01:00
thorkill
2ec9f1124d Merged with guus/1.1 2015-11-24 17:01:11 +01:00
Etienne Dechamps
675e3b497b Allow tinc to be built with miniupnpc on Windows.
Contrary to what I expected, it so happens that modern versions of MinGW
include an implementation of pthread natively by default, so there is no
need to introduce Win32-specific threading code. This means the only
changes required to make UPnP work on Windows are just build parameter
tuning.

This commit forces MinGW to be built statically. This makes linking
against miniupnpc simpler (otherwise we would have to handle the mess
of dllimport & co.) and it also prevents libwinpthread from being linked
dynamically (which it is by default), as this would require additional
DLLs to be distributed. Since static linking is how tinc is
traditionally built on Windows, I don't expect this to be a big deal.
2015-11-21 16:18:01 +00:00
Etienne Dechamps
2bb567c6a3 Add a new optional dependency on the miniupnpc library.
The miniupnpc library is a lightweight UPnP-IGD client.

http://miniupnp.free.fr/

Contrary to other libraries, this dependency is disabled by default.
This is because the library is somewhat obscure and is only tangentially
useful, so enabling it by default would probably annoy most users.
2015-11-21 15:49:25 +00:00
thorkill
e95c1a93a7 Merge with guus/1.1 2015-11-06 22:56:46 +01:00
Guus Sliepen
706d855e50 Replace bare if statements with AS_IF in configure.ac. 2015-09-24 22:20:00 +02:00
Guus Sliepen
f54a87b800 Optionally install systemd service files.
If --with-systemd is given when running the configure script, two
systemd service files will be installed. There is a template
tinc@.service, which can be used to control individual instances of
tinc. For example:

systemctl enable tinc@foo

Will create an instance for tinc with netname foo. There is also a
tinc.service, which can be used to start and stop all instances at once.
2015-09-24 22:11:16 +02:00
hans
c9515a79de Make it build on openbsd.
Build on amd64 and sparc64.
2015-08-25 09:30:32 +02:00
thorkill
2d38e37168 Make make dist work when /bin/sh != /bin/bash 2015-07-24 19:14:20 +02:00
thorkill
b68eaa7ce4 merged with origin/1.1 2015-07-17 00:29:46 +02:00
Guus Sliepen
f92c3446f2 Use AC_CONFIG_MACRO_DIR() instead of _DIRS().
The former is guaranteed to work with autoconf 2.58 and later, and we
don't have multiple m4 directories anyway.
2015-07-15 15:12:53 +02:00
Guus Sliepen
b7b5d51613 Use AC_CONFIG_MACRO_DIRS([m4]). 2015-07-12 13:05:51 +02:00
thorkill
8a6c5595b1 Added ./configure --enable-devel to enable -Werror and other developement settings 2015-07-02 21:55:50 +02:00
thorkill
1391b2d7dc Added -Werror=unused-parameter
In system.h UNUSED() macro has been defined which can be used to mark unsed parameters.
2015-07-02 18:35:57 +02:00
thorkill
cd10a37ce5 Added -Werror=unused-variable 2015-07-02 18:02:05 +02:00
thorkill
9b3ff33dba Added missing function prototypes
Found by clang -Wmissing-prototypes
2015-07-02 17:43:51 +02:00
thorkill
905572863c Added support for darwin
Darwin does not have -lrt
2015-07-01 11:18:29 +02:00
thorkill
fbb62fa80e Make proper checks in configure
now compiles with gcc 5.1.0
2015-06-30 23:20:31 +02:00
thorkill
3dc9542ec2 Disable -fno-strict-overflow and enable some -Werror= 2015-06-30 19:06:17 +02:00
thorkill
e9e3811657 Added tests into automake files. 2015-06-30 18:38:48 +02:00
thorkill
68644500b8 Added libtool support. 2015-06-30 18:38:11 +02:00
thorkill
d24a91a7cf Include m4 directory and changed default CFLAGS to -g -O0 2015-06-30 18:16:54 +02:00
Guus Sliepen
96a323e16a Remove info-in-builddir option from AM_INIT_AUTOMAKE().
This option is not supported by older, but still widely used versions of
automake. The drawback is that when doing multiple VPATH builds in a
row, the info manual may mention incorrect paths, but it doesn't affect
the executables at all.
2015-05-19 13:31:26 +02:00
Etienne Dechamps
13f9bc1ff1 Add support for out-of-tree ("VPATH") builds.
This fixes some issues with the build system when building out of tree.

With this commit, it is now possible to do the following:

    $ cd /tmp/build
    $ /path/to/tinc/configure
    $ make
2015-05-09 16:41:48 +01:00
Etienne Dechamps
462e9892ae Remove explicit distribution rules for m4 scripts.
It turns out Automake is smart enough to include these files in the
distribution by itself.
2015-05-09 16:17:39 +01:00
Guus Sliepen
362b791764 Really remove "release-" from the git-derived version string. 2015-05-09 15:41:37 +02:00
Etienne Dechamps
b109e8b164 Use git describe to populate autoconf's VERSION.
This uses the output of "git describe" directly in configure.ac to
determine the version number to use, instead of hardcoding it.

With this change, current version information is completely removed
from the codebase itself, and is always fetched on-the-fly from git as
the single source of truth.

In order to ensure make dist always uses the current version number in
the contents of the packaged configure script as well as the package
name, a dependency is added to the dist target such that autoconf is
always run before dist to regenerate the version number. If this wasn't
the case, make dist would use the version number from when autoconf was
originally run, not the version number that make dist is running from.
That said, errors from that rule are ignored so that people can still
run make dist without a working autoconf.

In addition, the NEWS check is dropped, as it would then become annoying
because it would force make dist users to always have a line for the
current commit in the NEWS file.
2015-05-09 12:14:31 +01:00
Guus Sliepen
cfe9285adf Allow tinc to be compiled without OpenSSL.
The option "--disable-legacy-protocol" was added to the configure
script. The new protocol does not depend on any external crypto
libraries, so when the option is used tinc is no longer linked to
OpenSSL's libcrypto.
2014-12-29 22:57:18 +01:00
Guus Sliepen
8d32b283b0 Releasing 1.1pre11. 2014-12-27 09:22:31 +01:00
Guus Sliepen
8ee4004edf Check whether res_init() really lives in libresolv.
On some platforms (Mac OS X for example), the res_init() function requires
linking with libresolv. On others (Linux, OpenBSD for example), res_init()
lives in libc.
2014-12-26 15:40:09 +01:00
Guus Sliepen
afb175873e Revert "Use git description as the tinc version."
This reverts commit e024b7a2c5. Automatic version
number generation needs a little bit more work to get it working correctly in
all cases.
2014-07-12 22:51:37 +02:00
Etienne Dechamps
d8ed5cf36d Fix a typo (FORTIFY_SOURCE). 2014-07-10 20:29:12 +01:00