1From 3be3b9a1345942d1578ec73efa9b2e3c41bd67c5 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Fri, 21 Jan 2022 13:22:24 +0800
4Subject: [PATCH] Add autogen.sh
5
6The autogen.sh has been removed since 3.0.22[1]. But we still need it in
7do_configure. Add it back.
8
9[1] https://github.com/FreeRADIUS/freeradius-server/commit/2e9b6227efd19e2b0926541aa26874908e7b7314
10
11Upstream-Status: Inappropriate [embedded specific]
12
13Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
14---
15 autogen.sh | 19 +++++++++++++++++++
16 1 file changed, 19 insertions(+)
17 create mode 100755 autogen.sh
18
19diff --git a/autogen.sh b/autogen.sh
20new file mode 100755
21index 0000000000..959182b39e
22--- /dev/null
23+++ b/autogen.sh
24@@ -0,0 +1,19 @@
25+#!/bin/sh -e
26+
27+parentdir=`dirname $0`
28+
29+cd $parentdir
30+parentdir=`pwd`
31+m4include="-I$parentdir -I$parentdir/m4 -Im4"
32+
33+autoreconf -Wcross --verbose --install --force
34+
35+mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
36+mysubdirs=`echo $mysubdirs`
37+
38+for F in $mysubdirs
39+do
40+	echo "Configuring in $F..."
41+	(cd $F && grep "^AC_CONFIG_HEADER" configure.ac > /dev/null || exit 0; autoheader $m4include)
42+	(cd $F && autoconf $m4include)
43+done
44--
452.25.1
46
47