summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-11-24 15:39:00 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-11-24 15:39:00 +0100
commit9a20fcbcd1b010ad88bfbb8b7f0417bec7327fb4 (patch)
tree9d1e7e6f3ebe36cbb1479cf149d58c64c2379d57
parentd4f5a1f47dbd04f26f2ddf951c97c4cb0ebbbe62 (diff)
build-sys: support local ./configure arguments
I often want to use the awesome "./autogen.sh [cmd]" arguments, but have to append some custom ./configure options. For now, I always had to edit autogen.sh manually, or copy the full commands out of it and run it myself. As I think this is super annoying, this commit adds support for ".config.args" files in $topdir. If it exists, any content is just appended to $args, thus to any ./configure invokation of autogen.sh. Maybe autotools provide something similar out-of-the-box. In that case, feel free to revert this and lemme know!
-rw-r--r--.gitignore1
-rwxr-xr-xautogen.sh4
2 files changed, 5 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 2293dedd8e..e5953d3086 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,7 @@
*.swp
*.trs
*~
+.config.args
.deps/
.dirstamp
.libs/
diff --git a/autogen.sh b/autogen.sh
index 0fc6e57027..7b62449be8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -50,6 +50,10 @@ args="\
--libdir=$(libdir /usr/lib) \
$gtkdocargs"
+if [ -f "$topdir/.config.args" ]; then
+ args="$args $(cat $topdir/.config.args)"
+fi
+
if [ ! -L /bin ]; then
args="$args \
--with-rootprefix= \