From 71652572e35bfeea2f346b7c700a3050bf27e466 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 9 May 2017 16:46:41 +0200 Subject: [PATCH] Minor autoconf cleanup and documentation update --- INSTALL | 12 +++++++++++- configure.ac | 20 +------------------- sysdep/unix/io.c | 2 +- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/INSTALL b/INSTALL index 38784fe6..a0b107ef 100644 --- a/INSTALL +++ b/INSTALL @@ -9,13 +9,23 @@ Default location for configuration file is /usr/local/etc/bird.conf and for control socket is /usr/local/var/run/bird.ctl . You can change that by --sysconfdir and --localstatedir configure options. +To compile current development BIRD source code from Git repository, you +also need Git (to download the source code) and Autoconf (to generate +the configure script and associated files using 'autoreconf' tool): + +$ git clone git://git.nic.cz/bird.git +$ cd bird +$ autoreconf + +Then continue as in usual installation above. + Requirements ============ For compiling BIRD you need these programs and libraries: - - GNU C Compiler + - GNU C Compiler (or LLVM Clang) - GNU Make - GNU Bison - GNU M4 diff --git a/configure.ac b/configure.ac index 2180bcdf..ca8d7690 100644 --- a/configure.ac +++ b/configure.ac @@ -241,25 +241,7 @@ case $sysdesc in esac AC_CHECK_HEADERS_ONCE([alloca.h syslog.h]) - -AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len) -AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[ - #include - #include - ]], - [[ - static struct sockaddr sa; - int i = sizeof(sa.sa_len); - ]] - )], - [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIN_LEN,,sin_len) - ], - [AC_MSG_RESULT(no)] -) +AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include ]) AC_C_BIGENDIAN( [AC_DEFINE([CPU_BIG_ENDIAN], [1], [Define to 1 if cpu is big endian])], diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 8773f4c4..561d4dea 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -516,7 +516,7 @@ static inline void sockaddr_fill4(struct sockaddr_in *sa, ip_addr a, uint port) { memset(sa, 0, sizeof(struct sockaddr_in)); -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_SA_LEN sa->sin_len = sizeof(struct sockaddr_in); #endif sa->sin_family = AF_INET;