diff options
author | ng0 <ng0@n0.is> | 2019-11-22 23:36:56 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-22 23:36:56 +0000 |
commit | f4690d7c8e707e4777eac03f7410337b9f26df30 (patch) | |
tree | dc2e9b9bb0750df0bc9d785df934848b0c6c5255 /configure.ac | |
parent | 33de5802a7d3983fbc802e4d282d2d68b91b3746 (diff) | |
download | gnunet-f4690d7c8e707e4777eac03f7410337b9f26df30.tar.gz gnunet-f4690d7c8e707e4777eac03f7410337b9f26df30.zip |
configure: define XBSD (see NOTE, needs better handling in general),
add logic to find and define tun.h
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 451d30496..f7b1c569a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -193,6 +193,10 @@ AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris") | |||
193 | AM_CONDITIONAL(XNETBSD, test "$build_target" = "netbsd") | 193 | AM_CONDITIONAL(XNETBSD, test "$build_target" = "netbsd") |
194 | AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd") | 194 | AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd") |
195 | AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd") | 195 | AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd") |
196 | # FIXME: We need a define BSD for some binaries like we | ||
197 | # need define LINUX for some. This does not scale, how | ||
198 | # can we solve this better? | ||
199 | AM_CONDITIONAL(XBSD, test "$build_target" = "netbsd" -o "$build_target" = "freebsd" -o "$build_target" = "openbsd") | ||
196 | AM_CONDITIONAL(LINUX, test "$build_target" = "linux") | 200 | AM_CONDITIONAL(LINUX, test "$build_target" = "linux") |
197 | AM_CONDITIONAL(GNU, test "$build_target" = "gnu") | 201 | AM_CONDITIONAL(GNU, test "$build_target" = "gnu") |
198 | 202 | ||
@@ -376,6 +380,14 @@ AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [require | |||
376 | 380 | ||
377 | AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]]) | 381 | AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]]) |
378 | 382 | ||
383 | AC_CHECK_HEADER([if_tun.h], | ||
384 | [AC_DEFINE([IF_TUN_HDR], ["if_tun.h"], [if_tun.h include path])], | ||
385 | [AC_CHECK_HEADER([linux/if_tun.h], | ||
386 | [AC_DEFINE([IF_TUN_HDR], ["linux/if_tun.h"])], | ||
387 | [AC_CHECK_HEADER([net/if_tun.h], | ||
388 | [AC_DEFINE([IF_TUN_HDR], ["net/if_tun.h"])], | ||
389 | [AC_CHECK_HEADER([net/tun/if_tun.h], | ||
390 | [AC_DEFINE([IF_TUN_HDR], ["net/tun/if_tun.h"])])])])]) | ||
379 | 391 | ||
380 | 392 | ||
381 | # should the build process be building the documentation? | 393 | # should the build process be building the documentation? |