diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-12-01 06:20:29 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-12-01 06:21:09 -0600 |
commit | edac2b708b4e334d5f75ae091e52a7d3aa7a3175 (patch) | |
tree | 355312b3b79b967e882167f4900d6178e6aa1bad /autogen.sh | |
parent | c3701eb55f74b0338aaa1d2387382a08f869c3b3 (diff) |
add support for --with-distro
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh index 6509b40a97bc..cd54c90bc802 100755 --- a/autogen.sh +++ b/autogen.sh @@ -18,7 +18,6 @@ requote() echo "$*" } - old_args="" if test $# -eq 0 && test -f autogen.lastrun; then old_args=$(cat autogen.lastrun) @@ -34,6 +33,20 @@ if test "z`uname -s`" != "zDarwin" ; then AUTOMAKE_EXTRA_FLAGS=--warnings=no-portability fi +conf_args=$(requote "$@") +distro_name=$(requote "$@" | sed -n -e "s/.*'--with-distro=\([^']*\)'.*/\1/p") +if test "z${distro_name}" != "z" ; then + cumul="" + if test -f "./distro-configs/${distro_name}.conf" ; then + IFS=$'\n' + for opt in $(cat distro-configs/${distro_name}.conf) ; do cumul="$cumul $opt" ; done ; + unset IFS + conf_args=$(requote "$@" | sed -e "s/'--with-distro=[^']*'/$cumul/") + else + echo "Warning: there is no pre-set configuration for ${distro_config}, ignoring --with-distro=${distro_config}" + fi +fi + aclocal $ACLOCAL_FLAGS || exit 1; #automake --gnu --add-missing --copy || exit 1; #intltoolize --copy --force --automake @@ -43,7 +56,8 @@ if test "x$NOCONFIGURE" = "x"; then eval `echo ./configure $old_args` else echo "$(requote "$@")" > autogen.lastrun - ./configure "$@" + echo "./configure ${conf_args}" + eval `echo ./configure ${conf_args}` fi else echo "Skipping configure process." |