From c5b04efb55304a7c6f569c33c8e5875a32877f31 Mon Sep 17 00:00:00 2001
From: Rickard Green <rickard@erlang.org>
Date: Mon, 21 Dec 2020 17:13:27 +0100
Subject: [PATCH] Fix uses of AC_CONFIG_AUX_DIRS() in configure scripts

---
 lib/megaco/configure.in | 7 +------
 lib/odbc/configure.in   | 7 +------
 lib/snmp/configure.in   | 7 +------
 3 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/lib/megaco/configure.in b/lib/megaco/configure.in
index bf22776ae01..789fbbed043 100644
--- a/lib/megaco/configure.in
+++ b/lib/megaco/configure.in
@@ -25,12 +25,7 @@ dnl define([AC_CACHE_SAVE], )dnl
 
 AC_INIT(vsn.mk)
 
-if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
-  AC_CONFIG_AUX_DIRS(autoconf)
-else
-  erl_top=${ERL_TOP}
-  AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)
-fi
+AC_CONFIG_AUX_DIRS(${ERL_TOP}/erts/autoconf)
 
 if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
     AC_CANONICAL_HOST
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index f13cd8c901c..7b02f0d4dfa 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -25,12 +25,7 @@ dnl define([AC_CACHE_SAVE], )dnl
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(c_src/odbcserver.c)
 
-if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
-  AC_CONFIG_AUX_DIRS(autoconf)
-else
-  erl_top=${ERL_TOP}
-  AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)
-fi
+AC_CONFIG_AUX_DIRS(${ERL_TOP}/erts/autoconf)
 
 if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
     AC_CANONICAL_HOST
diff --git a/lib/snmp/configure.in b/lib/snmp/configure.in
index f9ca8f9ac47..bac042ccca5 100644
--- a/lib/snmp/configure.in
+++ b/lib/snmp/configure.in
@@ -4,12 +4,7 @@ define([AC_CACHE_SAVE], )dnl
 
 AC_INIT(vsn.mk)
 
-if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then
-  AC_CONFIG_AUX_DIRS(autoconf)
-else
-  erl_top=${ERL_TOP}
-  AC_CONFIG_AUX_DIRS($erl_top/erts/autoconf)
-fi
+AC_CONFIG_AUX_DIRS(${ERL_TOP}/erts/autoconf)
 
 if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then
     AC_CANONICAL_HOST
