From: Dennis Braun <d_braun@kabelmail.de>
Date: Wed, 7 Dec 2022 07:57:15 +0100
Subject: Fixes autogen script

Forwarded: no
---
 autogen.sh               | 7 +------
 libs/midi++/configure.ac | 4 ++--
 libs/pbd/configure.ac    | 4 ++--
 3 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 7f36fcf..f563b55 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -44,7 +44,7 @@ PATH=$xtra_path$PATH
 export PATH
 
 acmacrodir=$pwd/aclocal
-custmacrodir=$pwd/m4
+custmacrodir=$pwd/aclocal
 
 system_macrodir=`aclocal --print-ac-dir`	
 
@@ -266,11 +266,6 @@ if [ "$libs_to_process" = "" ] ; then
     libs_to_process="libs $auto_lib_dirs $prog_dirs"
 fi
 
-for d in $libs_to_process
-do
-    (cd $d && echo "Building autoconf files for $d ..." && sh ./autogen.sh) || exit 1
-done
-
 echo "Building autoconf/automake files for the top level ..."
 aclocal $ACLOCAL_FLAGS && autoheader && automake --foreign --add-missing && autoconf
 
diff --git a/libs/midi++/configure.ac b/libs/midi++/configure.ac
index 7b729d3..72245c7 100644
--- a/libs/midi++/configure.ac
+++ b/libs/midi++/configure.ac
@@ -42,7 +42,7 @@ fi
 dnl We may need C++-11 for some versions of sigc
 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
 
-AM_OPT_FLAGS
+#AM_OPT_FLAGS
 
 AC_OBJEXT
 AC_LANG_CPLUSPLUS
@@ -241,7 +241,7 @@ AC_CHECK_FUNCS(strdup)
 dnl LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
 dnl AC_SUBST(LTLIBOBJS)
 
-AM_BUILD_ENVIRONMENT
+#AM_BUILD_ENVIRONMENT
 
 CXXFLAGS="$CXXFLAGS $GUI_INCLUDES $SIGCPP_CFLAGS"
 
diff --git a/libs/pbd/configure.ac b/libs/pbd/configure.ac
index 63fdcdb..a4522b3 100644
--- a/libs/pbd/configure.ac
+++ b/libs/pbd/configure.ac
@@ -32,7 +32,7 @@ if test "$ac_cv_prog_cxx" = "no" ; then
    AC_MSG_ERROR([*** libpbd is C++. You don't appear to have a C++ compiler])
 fi
 
-AM_OPT_FLAGS
+#AM_OPT_FLAGS
 
 AC_ARG_ENABLE(optimize,
      [  --disable-optimize       avoid optimizations to allow for gdb debugging.],
@@ -209,7 +209,7 @@ then
 fi
 
 
-AM_BUILD_ENVIRONMENT
+#AM_BUILD_ENVIRONMENT
 
 CFLAGS="$CFLAGS $XML_CFLAGS $SIGCPP_CFLAGS $ICU_CLFAGS"
 CXXFLAGS="$CXXFLAGS $XML_CFLAGS $SIGCPP_CFLAGS $ICU_CFLAGS"
