From 8f9aa28e8f00109a6f950a4f41e8191f086c3951 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Fri, 11 Dec 2009 11:17:30 +0000
Subject: [PATCH] avoid aclocal 'expanded before it was required' warnings

[[Imported from SVN: r5768]]
---
 bin/dunecontrol | 16 +---------------
 m4/dune_all.m4  | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/bin/dunecontrol b/bin/dunecontrol
index ee48c4829..9115c50cb 100755
--- a/bin/dunecontrol
+++ b/bin/dunecontrol
@@ -642,26 +642,12 @@ m4_define([DUNE_AC_INIT],[
   AC_SUBST([DUNE_MOD_NAME], [$name])
   AC_SUBST([DUNE_MAINTAINER_NAME], [$maintainer])
   DUNE_PARSE_MODULE_VERSION([$name], [$version])
-  # don't build shared libs per default, this is way better for debugging...
-  m4_ifdef([LT_INIT],
-    [LT_INIT([disable-shared])],
-    [AC_DEFUN([LT_OUTPUT])])
-  AC_DISABLE_SHARED
-#  LT_INIT([disable-shared])
-
   REQUIRES="$requires"
   AC_SUBST(REQUIRES, [$REQUIRES])
+  AC_CONFIG_MACRO_DIR([m4])
 ])
 
 AC_DEFUN([DUNE_CHECK_MOD_DEPENDENCIES], [
-  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_PROG_CPP])
-  AC_REQUIRE([AC_PROG_CXX])
-#  AC_REQUIRE([AC_PROG_CXXCPP])
-  AC_REQUIRE([AC_PROG_LIBTOOL])
-#  AC_REQUIRE([AC_LIBTOOL_LANG_CXX_CONFIG])
-#  m4_ifdef([],[AC_LIBTOOL_LANG_CXX_CONFIG])
 EOF
       ### initialize AM_CONDITIONAL for suggestions that were not found
       for name in $(eval echo \$SUGS_$mainmod); do
diff --git a/m4/dune_all.m4 b/m4/dune_all.m4
index 918e7d64b..eb2100a17 100644
--- a/m4/dune_all.m4
+++ b/m4/dune_all.m4
@@ -19,6 +19,22 @@ AC_DEFUN([DUNE_CHECK_ALL],[
   AS_IF([test "x$enabledist" = "xyes"],[
     AM_CONDITIONAL(DUNEWEB, false)])
 
+  dnl check the compilers
+  AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+  AC_REQUIRE([AC_PROG_CC])
+  AC_REQUIRE([AC_PROG_CPP])
+  AC_REQUIRE([AC_PROG_CXX])
+  AC_REQUIRE([AC_PROG_CXXCPP])
+  AC_REQUIRE([AC_PROG_F77])
+  AC_REQUIRE([AC_PROG_LIBTOOL])
+  # don't build shared libs per default, this is way better for debugging...
+  m4_ifdef([LT_INIT], [],
+  [
+    AC_DEFUN([LT_OUTPUT])
+    AC_DEFUN([LT_INIT], [AC_DISABLE_SHARED])
+  ])
+  LT_INIT([disable-shared])
+
   dnl check dependencies of this module
   dnl this test is autogenerated for each module
   AC_REQUIRE([DUNE_CHECK_MOD_DEPENDENCIES])
-- 
GitLab