The goal of this series is to make it possible to run autoreconf on a git checkout. It does this by moving configure.in to configure.ac and fixes deprecation warnings and errors generated by autoheader. I have some follow up patches with more cleanups, but this series is already large enough as it is.
configure.in has been deprecated for a long time --- configure.in => configure.ac | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename configure.in => configure.ac (100%) diff --git a/configure.in b/configure.ac similarity index 100% rename from configure.in rename to configure.ac -- 2.12.0
--- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 57fa0079..301e2ebe 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,8 @@ dnl ** Process it with autoconf to get ./configure dnl ** (c) 1999--2000 Martin Mares <mj@ucw.cz> AC_REVISION($Id$) -AC_INIT(conf/confbase.Y) +AC_INIT +AC_CONFIG_SRCDIR([conf/confbase.Y]) AC_CONFIG_AUX_DIR(tools) AC_ARG_ENABLE(debug, [ --enable-debug enable internal debugging routines (default: disabled)],,enable_debug=no) -- 2.12.0
$Id$ is never expanded in the git repo --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 301e2ebe..97d9dbce 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,6 @@ dnl ** This is a configure script template for BIRD dnl ** Process it with autoconf to get ./configure dnl ** (c) 1999--2000 Martin Mares <mj@ucw.cz> -AC_REVISION($Id$) AC_INIT AC_CONFIG_SRCDIR([conf/confbase.Y]) AC_CONFIG_AUX_DIR(tools) -- 2.12.0
--- configure.ac | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 97d9dbce..4ca956b7 100644 --- a/configure.ac +++ b/configure.ac @@ -299,16 +299,14 @@ AC_OUTPUT rm -f $objdir/sysdep/paths.h -cat >&AC_FD_MSG <<EOF - -BIRD was configured with the following options: - Source directory: $srcdir - Object directory: $objdir - Iproute2 directory: $iproutedir - System configuration: $sysdesc - Debugging: $enable_debug - POSIX threads: $enable_pthreads - Routing protocols: $protocols - Client: $enable_client -EOF +AC_MSG_RESULT() +AC_MSG_RESULT([BIRD was configured with the following options:]) +AC_MSG_RESULT([ Source directory: $srcdir]) +AC_MSG_RESULT([ Object directory: $objdir]) +AC_MSG_RESULT([ Iproute2 directory: $iproutedir]) +AC_MSG_RESULT([ System configuration: $sysdesc]) +AC_MSG_RESULT([ Debugging: $enable_debug]) +AC_MSG_RESULT([ POSIX threads: $enable_pthreads]) +AC_MSG_RESULT([ Routing protocols: $protocols]) +AC_MSG_RESULT([ Client: $enable_client]) rm -f $objdir/.*-stamp -- 2.12.0
--- configure.ac | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4ca956b7..75e90629 100644 --- a/configure.ac +++ b/configure.ac @@ -242,12 +242,23 @@ esac AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)]) AC_CHECK_HEADER(alloca.h, [AC_DEFINE(HAVE_ALLOCA_H)]) AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len) -AC_TRY_COMPILE([#include <sys/types.h> - #include <sys/socket.h> - ], [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_COMPILE_IFELSE([ + AC_LANG_PROGRAM( + [[ + #include <sys/types.h> + #include <sys/socket.h> + ]], + [[ + 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_C_BIGENDIAN([AC_DEFINE(CPU_BIG_ENDIAN)], [AC_DEFINE(CPU_LITTLE_ENDIAN)], [AC_MSG_ERROR([Cannot determine CPU endianity.])]) -- 2.12.0
AC_DEFINE and AC_DEFINE_UNQUOTED without a description have been deprecated for a while. $ autoreconf -v autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: configure.ac: not using aclocal autoreconf: configure.ac: tracing autoreconf: configure.ac: not using Libtool autoreconf: running: /usr/bin/autoconf autoreconf: running: /usr/bin/autoheader autoheader: warning: missing template: CPU_BIG_ENDIAN autoheader: Use AC_DEFINE([CPU_BIG_ENDIAN], [], [Description]) autoheader: warning: missing template: CPU_LITTLE_ENDIAN autoheader: warning: missing template: CPU_STRUCT_ALIGN autoheader: warning: missing template: DEBUGGING autoheader: warning: missing template: HAVE_ALLOCA_H autoheader: warning: missing template: HAVE_RL_CRLF autoheader: warning: missing template: HAVE_RL_DING autoheader: warning: missing template: HAVE_STRUCT_IP_MREQN autoheader: warning: missing template: HAVE_SYSLOG autoheader: warning: missing template: SYSCONF_INCLUDE autoheader: warning: missing template: TIME_T_IS_64BIT autoheader: warning: missing template: TIME_T_IS_SIGNED autoheader: warning: missing template: USE_PTHREADS autoreconf: /usr/bin/autoheader failed with exit status: 1 --- aclocal.m4 | 8 ++++---- configure.ac | 21 ++++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 02c0f76b..6f5560f0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -87,7 +87,7 @@ AC_MSG_RESULT([test program failed]) AC_MSG_ERROR([Cannot determine structure alignment]) ],[bird_cv_c_struct_align=16]) ]) -AC_DEFINE_UNQUOTED(CPU_STRUCT_ALIGN, $bird_cv_c_struct_align) +AC_DEFINE_UNQUOTED([CPU_STRUCT_ALIGN], [$bird_cv_c_struct_align], [Usual alignment of structures]) ]) AC_DEFUN(BIRD_CHECK_TIME_T, @@ -113,11 +113,11 @@ int main(void) ],[bird_cv_type_time_t="32-bit signed"]) ]) case "$bird_cv_type_time_t" in - *64-bit*) AC_DEFINE(TIME_T_IS_64BIT) ;; + *64-bit*) AC_DEFINE([TIME_T_IS_64BIT], [1], [Define to 1 if time_t is 64 bit]) ;; esac case "$bird_cv_type_time_t" in *unsigned*) ;; - *) AC_DEFINE(TIME_T_IS_SIGNED) ;; + *) AC_DEFINE([TIME_T_IS_SIGNED], [1], [Define to 1 if time_t is signed]) ;; esac ]) @@ -129,7 +129,7 @@ AC_TRY_COMPILE([#include <netinet/in.h> ],[bird_cv_struct_ip_mreqn=no ])]) if test "$bird_cv_struct_ip_mreqn" = yes ; then - AC_DEFINE(HAVE_STRUCT_IP_MREQN) + AC_DEFINE([HAVE_STRUCT_IP_MREQN], [1], [Define to 1 if you have struct ip_mreqn]) fi ]) diff --git a/configure.ac b/configure.ac index 75e90629..26c37a7b 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,7 @@ if test "$enable_pthreads" != no ; then BIRD_CHECK_PTHREADS if test "$bird_cv_lib_pthreads" = yes ; then - AC_DEFINE(USE_PTHREADS) + AC_DEFINE([USE_PTHREADS], [1], [Define to 1 if pthreads are enabled]) CFLAGS="$CFLAGS -pthread" LDFLAGS="$LDFLAGS -pthread" proto_bfd=bfd @@ -191,7 +191,7 @@ if ! test -f $sysdesc ; then AC_MSG_ERROR([The system configuration file is missing.]) fi sysname=`echo $sysdesc | sed 's/\.h$//'` -AC_DEFINE_UNQUOTED(SYSCONF_INCLUDE, "$sysdesc") +AC_DEFINE_UNQUOTED([SYSCONF_INCLUDE], ["$sysdesc"], [sysdep header to include]) AC_MSG_CHECKING([system-dependent directories]) sysdep_dirs="`sed <$sysdesc '/^Link: /!d;s/^Link: \(.*\)$/\1/' | tr '\012' ' '` lib" @@ -239,8 +239,8 @@ case $sysdesc in ;; esac -AC_CHECK_HEADER(syslog.h, [AC_DEFINE(HAVE_SYSLOG)]) -AC_CHECK_HEADER(alloca.h, [AC_DEFINE(HAVE_ALLOCA_H)]) +AC_CHECK_HEADER(syslog.h, [AC_DEFINE([HAVE_SYSLOG], [1], [Define to 1 if you have the <syslog.h> header file])]) +AC_CHECK_HEADER(alloca.h, [AC_DEFINE([HAVE_ALLOCA_H], [1], [Define to 1 if you have the <alloca.h> header file])]) AC_MSG_CHECKING(whether 'struct sockaddr' has sa_len) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( @@ -260,8 +260,11 @@ AC_COMPILE_IFELSE([ [AC_MSG_RESULT(no)] ) -AC_C_BIGENDIAN([AC_DEFINE(CPU_BIG_ENDIAN)], [AC_DEFINE(CPU_LITTLE_ENDIAN)], - [AC_MSG_ERROR([Cannot determine CPU endianity.])]) +AC_C_BIGENDIAN( + [AC_DEFINE([CPU_BIG_ENDIAN], [1], [Define to 1 if cpu is big endian])], + [AC_DEFINE([CPU_LITTLE_ENDIAN], [1], [Define to 1 if cpu is little endian])], + [AC_MSG_ERROR([Cannot determine CPU endianity.])] +) BIRD_CHECK_INTEGERS BIRD_CHECK_STRUCT_ALIGN @@ -269,7 +272,7 @@ BIRD_CHECK_TIME_T BIRD_CHECK_STRUCT_IP_MREQN if test "$enable_debug" = yes ; then - AC_DEFINE(DEBUGGING) + AC_DEFINE([DEBUGGING], [1], [Define to 1 if debugging is enabled]) if test "$enable_memcheck" = yes ; then AC_CHECK_LIB(dmalloc, dmalloc_debug) if test $ac_cv_lib_dmalloc_dmalloc_debug != yes ; then @@ -291,8 +294,8 @@ if test "$enable_client" = yes ; then AC_MSG_ERROR([[The client requires ncurses library. Either install the library or use --disable-client to compile without the client.]])))))) AC_CHECK_LIB(readline, rl_callback_read_char, CLIENT_LIBS="-lreadline $CLIENT_LIBS $USE_TERMCAP_LIB", AC_MSG_ERROR([[The client requires GNU readline library 2.1 or newer. Either install the library or use --disable-client to compile without the client.]]), $USE_TERMCAP_LIB) - AC_CHECK_LIB(readline, rl_crlf, AC_DEFINE(HAVE_RL_CRLF),,$USE_TERMCAP_LIB) - AC_CHECK_LIB(readline, rl_ding, AC_DEFINE(HAVE_RL_DING),,$USE_TERMCAP_LIB) + AC_CHECK_LIB(readline, rl_crlf, AC_DEFINE([HAVE_RL_CRLF], [1], [Define to 1 if you have rl_crlf()]),,$USE_TERMCAP_LIB) + AC_CHECK_LIB(readline, rl_ding, AC_DEFINE([HAVE_RL_DING], [1], [Define to 1 if you have rl_ding()]),,$USE_TERMCAP_LIB) fi AC_SUBST(CLIENT) AC_SUBST(CLIENT_LIBS) -- 2.12.0
--- .gitignore | 1 + configure.ac | 1 + aclocal.m4 => m4/bird.m4 | 0 3 files changed, 2 insertions(+) rename aclocal.m4 => m4/bird.m4 (100%) diff --git a/.gitignore b/.gitignore index 52510836..4945b84e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/aclocal.m4 /autom4te.cache/ /doc/*.html /obj/ diff --git a/configure.ac b/configure.ac index 26c37a7b..d9213ed6 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,7 @@ dnl ** (c) 1999--2000 Martin Mares <mj@ucw.cz> AC_INIT AC_CONFIG_SRCDIR([conf/confbase.Y]) AC_CONFIG_AUX_DIR(tools) +AC_CONFIG_MACRO_DIR([m4]) AC_ARG_ENABLE(debug, [ --enable-debug enable internal debugging routines (default: disabled)],,enable_debug=no) AC_ARG_ENABLE(memcheck, [ --enable-memcheck check memory allocations when debugging (default: enabled)],,enable_memcheck=yes) diff --git a/aclocal.m4 b/m4/bird.m4 similarity index 100% rename from aclocal.m4 rename to m4/bird.m4 -- 2.12.0
autoreconf: running: aclocal m4/bird.m4:4: warning: underquoted definition of BIRD_CHECK_INTEGERS m4/bird.m4:4: run info Automake 'Extending aclocal' m4/bird.m4:4: or see http://www.gnu.org/software/automake/manual/automake.html#Extending-aclocal --- m4/bird.m4 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/m4/bird.m4 b/m4/bird.m4 index 6f5560f0..e7676368 100644 --- a/m4/bird.m4 +++ b/m4/bird.m4 @@ -1,7 +1,7 @@ dnl ** Additional Autoconf tests for BIRD configure script dnl ** (c) 1999 Martin Mares <mj@ucw.cz> -AC_DEFUN(BIRD_CHECK_INTEGERS, +AC_DEFUN([BIRD_CHECK_INTEGERS], [AC_CHECK_SIZEOF(char, 0) AC_CHECK_SIZEOF(short int, 0) AC_CHECK_SIZEOF(int, 0) @@ -30,7 +30,7 @@ for size in 1 2 4 8; do ]) dnl BIRD_CHECK_ENDIAN is unused and obsolete -AC_DEFUN(BIRD_CHECK_ENDIAN, +AC_DEFUN([BIRD_CHECK_ENDIAN], [AC_CACHE_CHECK([CPU endianity], bird_cv_c_endian,[ AC_TRY_RUN([ #include <stdio.h> @@ -65,7 +65,7 @@ case $bird_cv_c_endian in esac ]) -AC_DEFUN(BIRD_CHECK_STRUCT_ALIGN, +AC_DEFUN([BIRD_CHECK_STRUCT_ALIGN], [AC_CACHE_CHECK([usual alignment of structures],bird_cv_c_struct_align,[ AC_TRY_RUN([ #include <stdio.h> @@ -90,7 +90,7 @@ AC_MSG_ERROR([Cannot determine structure alignment]) AC_DEFINE_UNQUOTED([CPU_STRUCT_ALIGN], [$bird_cv_c_struct_align], [Usual alignment of structures]) ]) -AC_DEFUN(BIRD_CHECK_TIME_T, +AC_DEFUN([BIRD_CHECK_TIME_T], [AC_CACHE_CHECK([characteristics of time_t], bird_cv_type_time_t, [ AC_TRY_RUN([ #include <stdio.h> @@ -121,7 +121,7 @@ case "$bird_cv_type_time_t" in esac ]) -AC_DEFUN(BIRD_CHECK_STRUCT_IP_MREQN, +AC_DEFUN([BIRD_CHECK_STRUCT_IP_MREQN], [AC_CACHE_CHECK([for struct ip_mreqn], bird_cv_struct_ip_mreqn,[ AC_TRY_COMPILE([#include <netinet/in.h> ],[struct ip_mreqn x; @@ -133,7 +133,7 @@ if test "$bird_cv_struct_ip_mreqn" = yes ; then fi ]) -AC_DEFUN(BIRD_CHECK_PTHREADS, +AC_DEFUN([BIRD_CHECK_PTHREADS], [ bird_tmp_cflags="$CFLAGS" @@ -145,7 +145,7 @@ AC_DEFUN(BIRD_CHECK_PTHREADS, CFLAGS="$bird_tmp_cflags" ]) -AC_DEFUN(BIRD_CHECK_GCC_OPTION, +AC_DEFUN([BIRD_CHECK_GCC_OPTION], [ bird_tmp_cflags="$CFLAGS" @@ -156,7 +156,7 @@ AC_DEFUN(BIRD_CHECK_GCC_OPTION, CFLAGS="$bird_tmp_cflags" ]) -AC_DEFUN(BIRD_ADD_GCC_OPTION, +AC_DEFUN([BIRD_ADD_GCC_OPTION], [ if test "$$1" = yes ; then CFLAGS="$CFLAGS $2" -- 2.12.0
Right now there are empty defines for these in sysdeps/autoconf.h.in, but if we want to start using autoheader we'll need to generate these. --- m4/bird.m4 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/m4/bird.m4 b/m4/bird.m4 index e7676368..f2775422 100644 --- a/m4/bird.m4 +++ b/m4/bird.m4 @@ -7,6 +7,11 @@ AC_CHECK_SIZEOF(short int, 0) AC_CHECK_SIZEOF(int, 0) AC_CHECK_SIZEOF(long int, 0) AC_CHECK_SIZEOF(long long int, 0) +AH_TEMPLATE([INTEGER_8], [8-bit integer type]) +AH_TEMPLATE([INTEGER_16], [16-bit integer type]) +AH_TEMPLATE([INTEGER_32], [32-bit integer type]) +AH_TEMPLATE([INTEGER_64], [64-bit integer type]) + for size in 1 2 4 8; do bits=`expr $size "*" 8` AC_MSG_CHECKING([for $bits-bit type]) -- 2.12.0
Right now there are empty defines for these in sysdeps/autoconf.h.in, but if we want to start using autoheader we'll need to generate these. --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index d9213ed6..fdf2c69d 100644 --- a/configure.ac +++ b/configure.ac @@ -218,6 +218,15 @@ if test "$with_protocols" = all ; then with_protocols="$all_protocols" fi +AH_TEMPLATE(CONFIG_BABEL) +AH_TEMPLATE(CONFIG_BFD) +AH_TEMPLATE(CONFIG_BGP) +AH_TEMPLATE(CONFIG_OSPF) +AH_TEMPLATE(CONFIG_PIPE) +AH_TEMPLATE(CONFIG_RADV) +AH_TEMPLATE(CONFIG_RIP) +AH_TEMPLATE(CONFIG_STATIC) + AC_MSG_CHECKING([protocols]) protocols=`echo "$with_protocols" | sed 's/,/ /g'` if test "$protocols" = no ; then protocols= ; fi -- 2.12.0
It can now safely be generated. This will mean you need to run autoreconf from now on after you cloned the git repo. --- .gitignore | 1 + sysdep/autoconf.h.in | 70 ---------------------------------------------------- 2 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 sysdep/autoconf.h.in diff --git a/.gitignore b/.gitignore index 4945b84e..71c58fc8 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /configure /bird.conf /bird.log +/sysdep/autoconf.h.in diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in deleted file mode 100644 index c73270c3..00000000 --- a/sysdep/autoconf.h.in +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This file contains all system parameters automatically - * discovered by the configure script. - */ - -/* System configuration file */ -#define SYSCONF_INCLUDE ? - -/* Include debugging code */ -#undef DEBUGGING - -/* 8-bit integer type */ -#define INTEGER_8 ? - -/* 16-bit integer type */ -#define INTEGER_16 ? - -/* 32-bit integer type */ -#define INTEGER_32 ? - -/* 64-bit integer type */ -#define INTEGER_64 ? - -/* CPU endianity */ -#undef CPU_LITTLE_ENDIAN -#undef CPU_BIG_ENDIAN - -/* Usual alignment for structures */ -#define CPU_STRUCT_ALIGN 1 - -/* Characteristics of time_t */ -#undef TIME_T_IS_64BIT -#undef TIME_T_IS_SIGNED - -/* We have struct ip_mreqn in <netinet/in.h> */ -#undef HAVE_STRUCT_IP_MREQN - -/* Protocols compiled in */ -#undef CONFIG_STATIC -#undef CONFIG_RIP -#undef CONFIG_RADV -#undef CONFIG_BFD -#undef CONFIG_BGP -#undef CONFIG_OSPF -#undef CONFIG_PIPE -#undef CONFIG_BABEL - -/* We use multithreading */ -#undef USE_PTHREADS - -/* We have <syslog.h> and syslog() */ -#undef HAVE_SYSLOG - -/* We have <alloca.h> */ -#undef HAVE_ALLOCA_H - -/* Are we using dmalloc? */ -#undef HAVE_LIBDMALLOC - -/* Readline stuff */ -#undef HAVE_RL_CRLF -#undef HAVE_RL_DING - -/* struct sockaddr_in(6) */ -#undef HAVE_SIN_LEN - -/* We have stdint.h */ -#undef HAVE_STDINT_H - -#define CONFIG_PATH ? -- 2.12.0
On Sat, Mar 04, 2017 at 06:13:16PM +0100, Ruben Kerkhof wrote:
The goal of this series is to make it possible to run autoreconf on a git checkout.
It does this by moving configure.in to configure.ac and fixes deprecation warnings and errors generated by autoheader.
Hi Thanks for the cleanup patches, our configure script is old and not much kept up-to-date. I have some questions w.r.t. your patches: It seems that (by removing sysdep/autoconf.h.in) the patchset not only make it possible to run autoreconf, but make it necessary. I am not familiar with that tool, could you briefly describe what are advantages of using it?
rename aclocal.m4 => m4/bird.m4 (100%)
Is this necessary? I have an aversion to boilerplate directories containing just one file.
+AH_TEMPLATE(CONFIG_BABEL) +AH_TEMPLATE(CONFIG_BFD) ...
Shouldn't quotes be also there? Esp. when other patches added plenty of quotes to other macro expressions.
-AC_INIT(conf/confbase.Y) +AC_INIT
According to autoconf doc, AC_INIT should have at least arguments 'package, version'? Well, they were missing in the old code too ... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Tue, Mar 7, 2017 at 12:17 AM, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Sat, Mar 04, 2017 at 06:13:16PM +0100, Ruben Kerkhof wrote:
The goal of this series is to make it possible to run autoreconf on a git checkout.
It does this by moving configure.in to configure.ac and fixes deprecation warnings and errors generated by autoheader.
Hi
Hi Ondrej,
Thanks for the cleanup patches, our configure script is old and not much kept up-to-date. I have some questions w.r.t. your patches:
Thanks for looking at my patches.
It seems that (by removing sysdep/autoconf.h.in) the patchset not only make it possible to run autoreconf, but make it necessary. I am not familiar with that tool, could you briefly describe what are advantages of using it?
Of course. You're right, I should have mentioned this in the commit message. autoreconf ships with autoconf, and it has been the standard tool to bootstrap a development checkout for a few years. Note, it is only needed if you want to develop from a git checkout, not for an end user building from a tarball. There's more documentation at https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/autorec... I also believe there's strong interest, at least in Debian and in Fedora too, to run autoreconf by default, to make sure config.sub is always up to date: https://wiki.debian.org/Autoreconf
rename aclocal.m4 => m4/bird.m4 (100%)
Is this necessary? I have an aversion to boilerplate directories containing just one file.
It's not strictly necessary since bird doesn't use automake, but m4/ is somewhat of a canonical location. I have plans to split this file up in later patches, and to see which ones of these macros are still needed and possibly redo them differently, in configure.ac itself.
+AH_TEMPLATE(CONFIG_BABEL) +AH_TEMPLATE(CONFIG_BFD) ...
Shouldn't quotes be also there? Esp. when other patches added plenty of quotes to other macro expressions.
You're right, I missed that.
-AC_INIT(conf/confbase.Y) +AC_INIT
According to autoconf doc, AC_INIT should have at least arguments 'package, version'? Well, they were missing in the old code too ...
It works fine without these until you start using automake. I didn't want to define the package version in there yet, since there's BIRD_VERSION too. I can add this and replace BIRD_VERSION with PACKAGE_VERSION if you want in a followup patch.
-- Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Kind regards, Ruben Kerkhof
On Tue, Mar 07, 2017 at 03:20:09PM +0100, Ruben Kerkhof wrote:
On Tue, Mar 7, 2017 at 12:17 AM, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Sat, Mar 04, 2017 at 06:13:16PM +0100, Ruben Kerkhof wrote: Thanks for the cleanup patches, our configure script is old and not much kept up-to-date. I have some questions w.r.t. your patches:
Thanks for looking at my patches.
Hi Accepted and merged, with the exception of patch 07 (rename aclocal.m4 to m4/bird.m4).
I have some follow up patches with more cleanups, but this series is already large enough as it is.
I would be glad to see them.
rename aclocal.m4 => m4/bird.m4 (100%)
Is this necessary? I have an aversion to boilerplate directories containing just one file.
It's not strictly necessary since bird doesn't use automake, but m4/ is somewhat of a canonical location. I have plans to split this file up in later patches, and to see which ones of these macros are still needed and possibly redo them differently, in configure.ac itself.
I would prefer to keep self-contained macros in aclocal.m4, while keeping configure.ac simple. Perhaps even transfer some non-trivial code from configure.ac (e.g., ncurses finding or sa_len check) to a separate macros in aclocal.m4. But i am OK with removing unnecessary and redoing macros differently in aclocal.m4 (e.g., integer length testing macros are most likely obsolete and could be replaced by C99 types). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
On Tue, Mar 14, 2017 at 2:08 PM, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Tue, Mar 07, 2017 at 03:20:09PM +0100, Ruben Kerkhof wrote:
On Tue, Mar 7, 2017 at 12:17 AM, Ondrej Zajicek <santiago@crfreenet.org> wrote:
On Sat, Mar 04, 2017 at 06:13:16PM +0100, Ruben Kerkhof wrote: Thanks for the cleanup patches, our configure script is old and not much kept up-to-date. I have some questions w.r.t. your patches:
Thanks for looking at my patches.
Hi
Accepted and merged, with the exception of patch 07 (rename aclocal.m4 to m4/bird.m4).
Thanks a lot.
I have some follow up patches with more cleanups, but this series is already large enough as it is.
I would be glad to see them.
Ok, I'll have something ready in the next few days.
rename aclocal.m4 => m4/bird.m4 (100%)
Is this necessary? I have an aversion to boilerplate directories containing just one file.
It's not strictly necessary since bird doesn't use automake, but m4/ is somewhat of a canonical location. I have plans to split this file up in later patches, and to see which ones of these macros are still needed and possibly redo them differently, in configure.ac itself.
I would prefer to keep self-contained macros in aclocal.m4, while keeping configure.ac simple. Perhaps even transfer some non-trivial code from configure.ac (e.g., ncurses finding or sa_len check) to a separate macros in aclocal.m4.
Sounds good.
But i am OK with removing unnecessary and redoing macros differently in aclocal.m4 (e.g., integer length testing macros are most likely obsolete and could be replaced by C99 types).
Yes, I was thinking about that. Do you object to switching the code base to just use the fixed width integer types from <stdint.h>? It will be a large change, but mostly mechanical.
-- Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Kind regards, Ruben Kerkhof
On Tue, Mar 14, 2017 at 06:54:39PM +0100, Ruben Kerkhof wrote:
But i am OK with removing unnecessary and redoing macros differently in aclocal.m4 (e.g., integer length testing macros are most likely obsolete and could be replaced by C99 types).
Yes, I was thinking about that. Do you object to switching the code base to just use the fixed width integer types from <stdint.h>? It will be a large change, but mostly mechanical.
Yes, i would prefer to keep current names, just adding some typedef. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
participants (2)
-
Ondrej Zajicek -
Ruben Kerkhof