summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-01-28 19:01:25 +0100
committerDavid Sterba <dsterba@suse.cz>2015-01-28 19:03:23 +0100
commit1fabba7ef735b2387ad144abe4e22b81269ec30c (patch)
tree738b5ee84a6d1ac6a2a4e477066e141a12bf1462 /autogen.sh
parent58f92c7cafb06ccfdc34d40ad8a9463dde01790f (diff)
btrfs-progs: build, make autogen.sh work on older systems
Try harder to find the support scipts, look into libtool or automake dirs directly. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/autogen.sh b/autogen.sh
index 8d996cf4..b74e7939 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -61,11 +61,27 @@ autoheader $AH_OPTS
# it's better to use helper files from automake installation than
# maintain copies in git tree
-HELPER_DIR=$(automake --print-libdir)
+find_autofile() {
+ if [ -f "$1" ]; then
+ return
+ fi
+ for HELPER_DIR in $(automake --print-libdir 2>/dev/null) \
+ /usr/share/libtool \
+ /usr/share/automake-* ; do
+ f="$HELPER_DIR/$1"
+ if [ -f "$f" ]; then
+ cp "$f" config/
+ return
+ fi
+ done
+ echo "Cannot find "$1" in known locations"
+ exit 1
+}
+
mkdir -p config/
-cp $HELPER_DIR/config.guess config/
-cp $HELPER_DIR/config.sub config/
-cp $HELPER_DIR/install-sh config/
+find_autofile config.guess
+find_autofile config.sub
+find_autofile install-sh
cd $THEDIR