[PATCH 10/13] configure.ac: reorganize a bit

Ruben Kerkhof ruben at rubenkerkhof.com
Sat Mar 18 17:25:40 CET 2017


---
 configure.ac | 65 ++++++++++++++++++++++++++++++------------------------------
 1 file changed, 33 insertions(+), 32 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a7ae0ca..ee352790 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,39 @@ AC_INIT
 AC_CONFIG_SRCDIR([conf/confbase.Y])
 AC_CONFIG_AUX_DIR([tools])
 
+AC_CANONICAL_HOST
+
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_RANLIB
+
+# Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
+if test "$ac_test_CFLAGS" != set ; then
+  bird_cflags_default=yes
+fi
+
+AC_PROG_CC
+if test -z "$GCC" ; then
+  AC_MSG_ERROR([This program requires the GNU C Compiler.])
+fi
+
+AC_ARG_VAR([FLEX], [location of the Flex program])
+AC_ARG_VAR([BISON], [location of the Bison program])
+AC_ARG_VAR([M4], [location of the M4 program])
+
+AC_CHECK_PROG([FLEX], [flex], [flex])
+AC_CHECK_PROG([BISON], [bison], [bison])
+AC_CHECK_PROGS([M4], [gm4 m4])
+
+test -z "$FLEX"  && AC_MSG_ERROR([Flex is missing.])
+test -z "$BISON" && AC_MSG_ERROR([Bison is missing.])
+test -z "$M4"  && AC_MSG_ERROR([M4 is missing.])
+BIRD_CHECK_PROG_FLAVOR_GNU([$M4],
+  [],
+  [AC_MSG_ERROR([Provided M4 is not GNU M4.])]
+)
+
+
 AC_ARG_ENABLE([client],
   [AS_HELP_STRING([--enable-client], [enable building of BIRD client @<:@default=yes@:>@])],
   [],
@@ -66,11 +99,6 @@ AC_ARG_WITH([sysinclude],
   [AS_HELP_STRING([--with-sysinclude=PATH], [search for system includes in specified path])]
 )
 
-AC_ARG_VAR([FLEX], [location of the Flex program])
-AC_ARG_VAR([BISON], [location of the Bison program])
-AC_ARG_VAR([M4], [location of the M4 program])
-
-
 if test "$srcdir" = . ; then
   # Building in current directory => create obj directory holding all objects
   objdir=obj
@@ -123,18 +151,6 @@ AC_SEARCH_LIBS([clock_gettime], [c rt posix4],
   [AC_MSG_ERROR([Function clock_gettime not available.])]
 )
 
-AC_CANONICAL_HOST
-
-# Store this value because ac_test_CFLAGS is overwritten by AC_PROG_CC
-if test "$ac_test_CFLAGS" != set ; then
-  bird_cflags_default=yes
-fi
-
-AC_PROG_CC
-if test -z "$GCC" ; then
-  AC_MSG_ERROR([This program requires the GNU C Compiler.])
-fi
-
 if test "$enable_pthreads" != no ; then
   BIRD_CHECK_PTHREADS
 
@@ -168,21 +184,6 @@ AC_MSG_CHECKING([CFLAGS])
 AC_MSG_RESULT([$CFLAGS])
 
 
-AC_PROG_CPP
-AC_PROG_INSTALL
-AC_PROG_RANLIB
-AC_CHECK_PROG([FLEX], [flex], [flex])
-AC_CHECK_PROG([BISON], [bison], [bison])
-AC_CHECK_PROGS([M4], [gm4 m4])
-
-test -z "$FLEX"  && AC_MSG_ERROR([Flex is missing.])
-test -z "$BISON" && AC_MSG_ERROR([Bison is missing.])
-test -z "$M4"  && AC_MSG_ERROR([M4 is missing.])
-BIRD_CHECK_PROG_FLAVOR_GNU([$M4],
-  [],
-  [AC_MSG_ERROR([Provided M4 is not GNU M4.])]
-)
-
 if test -n "$with_sysconfig" -a "$with_sysconfig" != no ; then
   if test -f $with_sysconfig ; then
     sysdesc=$with_sysconfig
-- 
2.12.0



More information about the Bird-users mailing list