From 5b6a58f419c3d6fdd4abbe9943cd17a4fd2addcc Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Tue, 14 Jan 2003 15:58:32 +0000 Subject: [PATCH] closes #98062 Original commit message from CVS: closes #98062 --- gst-autogen.sh | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/gst-autogen.sh b/gst-autogen.sh index d8fecc6..b5fd60f 100644 --- a/gst-autogen.sh +++ b/gst-autogen.sh @@ -198,19 +198,12 @@ die_check () autogen_options () { - if test "x`getopt --version | cut -d' ' -f2`" != "x(enhanced)"; then - echo "- non-gnu getopt(1) detected, not running getopt on autogen command-line options" + if test "x$1" == "x"; then return 0 fi - # we use getopt stuff here, copied things from the example example.bash - # prefix is explicitly carried over to configure by request of jdahlin - TEMP=`getopt -o h --long noconfigure,nocheck,debug,help,with-automake:,with-autoconf:,prefix:\ - -- "$@"` - - eval set -- "$TEMP" - - while true ; do + while test "x$1" != "x" ; do + optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` case "$1" in --noconfigure) NOCONFIGURE=defined @@ -230,10 +223,10 @@ autogen_options () echo "+ debug output enabled" shift ;; - --prefix) - CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$2" - echo "+ passing --prefix=$2 to configure" - shift 2 + --prefix=*) + CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$optarg" + echo "+ passing --prefix=$optarg to configure" + shift ;; -h|--help) echo "autogen.sh (autogen options) -- (configure options)" @@ -249,17 +242,17 @@ autogen_options () echo "to pass options to configure, put them as arguments after -- " exit 1 ;; - --with-automake) - AUTOMAKE=$2 - echo "+ using alternate automake in $2" + --with-automake=*) + AUTOMAKE=$optarg + echo "+ using alternate automake in $optarg" CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE" - shift 2 + shift ;; - --with-autoconf) - AUTOCONF=$2 - echo "+ using alternate autoconf in $2" + --with-autoconf=*) + AUTOCONF=$optarg + echo "+ using alternate autoconf in $optarg" CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF" - shift 2 + shift ;; --) shift ; break ;; *) echo "Internal error !" ; exit 1 ;; -- 2.7.4