AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_CC_C_O
-LT_INIT([disable-static dlopen win32-dll])
+LT_INIT([disable-static dlopen])
AC_SUBST(MKDIR_P)
# allow for different autotools
AC_PATH_XTRA
],
[*freebsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
CFLAGS="-D_THREAD_SAFE $CFLAGS"
build_target="freebsd"
LIBPREFIX=
UNIXONLY="#"
],
[*openbsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
LIBS=`echo $LIBS | sed -e "s/-ldl//"`
build_target="openbsd"
+ use_openbsd_libtool=true
LIBPREFIX=
DLLDIR=lib
UNIXONLY="#"
],
[*netbsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
build_target="netbsd"
LIBPREFIX=
DLLDIR=lib
AM_CONDITIONAL(XNETBSD, test "$build_target" = "netbsd")
AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
+# FIXME: We need a define BSD for some binaries like we
+# need define LINUX for some. This does not scale, how
+# can we solve this better?
+AM_CONDITIONAL(XBSD, test "$build_target" = "netbsd" -o "$build_target" = "freebsd" -o "$build_target" = "openbsd")
AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
AM_CONDITIONAL(GNU, test "$build_target" = "gnu")
AC_CHECK_DECLS([struct in6_ifreq], [], [], [[#include <linux/if_tun.h>]])
+AC_CHECK_HEADER([if_tun.h],
+ [AC_DEFINE([IF_TUN_HDR], ["if_tun.h"], [if_tun.h include path])],
+ [AC_CHECK_HEADER([linux/if_tun.h],
+ [AC_DEFINE([IF_TUN_HDR], ["linux/if_tun.h"])],
+ [AC_CHECK_HEADER([net/if_tun.h],
+ [AC_DEFINE([IF_TUN_HDR], ["net/if_tun.h"])],
+ [AC_CHECK_HEADER([net/tun/if_tun.h],
+ [AC_DEFINE([IF_TUN_HDR], ["net/tun/if_tun.h"])])])])])
# should the build process be building the documentation?
[0],
[Not building the documentation])])
-# COMMENT: Check wether to transpile texinfo to mdoc.
+# COMMENT: Check whether to transpile texinfo to mdoc.
# COMMENT: This is TRUE when --enable-texi2mdoc-generation
# COMMENT: but ERRORS when texi2mdoc binary is missing in your $PATH
# COMMENT: and makes the configure fail if it is missing.
# COMMENT: There are 2 nested AS_IFs because we need to catch the
# COMMENT: potential non-existence of the texi2mdoc binary.
# COMMENT: Default return value / setting: no
-AC_MSG_CHECKING(wether to include generated texi2mdoc output in installation)
+AC_MSG_CHECKING(whether to include generated texi2mdoc output in installation)
AC_ARG_ENABLE([texi2mdoc-generation],
[AS_HELP_STRING([--enable-texi2mdoc-generation],
[include generated texi2mdoc output in installation])],
[0],
[Not building section 7 mdoc output])])
-# test for texi2mdoc
+# test for texi2mdoc (the binary, not the script distributed
+# with autogen)
# TODO: refactor this and the check above.
-AC_MSG_CHECKING(for texi2mdoc)
+AC_MSG_CHECKING(for texi2mdoc binary)
AC_CHECK_PROGS(TEXI2MDOC_BINARY, [texi2mdoc], false)
AM_CONDITIONAL(HAVE_TEXI2MDOC, test x$TEXI2MDOC_BINARY != xfalse)
+# texi2man is a tool which needs to be investigated and
+# is probably incompatible to texi2mdoc in invocation.
+# Detection at this point only serves as a reminder that
+# I will work this into the build-system.
+AC_MSG_CHECKING(for texi2man perl script)
+AC_CHECK_PROGS(TEXI2MAN_SCRIPT, [texi2man], false)
+AM_CONDITIONAL(HAVE_TEXI2MAN, test x$TEXI2MAN_SCRIPT != xfalse)
+
+
# test for mandoc
-AC_MSG_CHECKING(for mandoc)
+AC_MSG_CHECKING(for mandoc binary)
AC_CHECK_PROGS(MANDOC_BINARY, [mandoc], false)
AM_CONDITIONAL(HAVE_MANDOC, test x$MANDOC_BINARY != xfalse)
[AC_DEFINE([HAVE_LIBBLUETOOTH],[0],[Lacking bluetooth library])])
# check for zbar library
-# TODO: Add checks for: -lSM, -lICE, -lX11, -lXv and -ljpeg
-# TODO: if zbar exists.
+# NOTE: Do not add checks for: -lSM, -lICE, -lX11, -lXv and -ljpeg
+# NOTE: they must be provided by the build environment, not the
+# NOTE: build-system of gnunet, as they are 2nd or 3rd level dependencies.
zbar=0
AC_MSG_CHECKING(for libzbar)
AC_ARG_WITH(zbar,
AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"])
# should gnunet-testing be compiled
-AC_MSG_CHECKING(wether to compile gnunet-testing)
+AC_MSG_CHECKING(whether to compile gnunet-testing)
AC_ARG_ENABLE([testing],
[AS_HELP_STRING([--disable-testing], [do not build gnunet-testing])],
[enable_testing=${enableval}],