From 8147f4b4918a4bcb187d942039801daf5ae13cd6 Mon Sep 17 00:00:00 2001
From: Christian Engwer <christi@dune-project.org>
Date: Tue, 28 Jun 2005 15:45:39 +0000
Subject: [PATCH] correctly quote autogen parameters

[[Imported from SVN: r2288]]
---
 autogen.sh | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 5830ea9cc..e5d5f2958 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -22,8 +22,7 @@ usage () {
 
 # no compiler set yet
 COMPSET=0
-for OPT in $* ; do
-
+for OPT in "$@"; do
     set +e
     # stolen from configure...
     # when no option is set, this returns an error code
@@ -47,7 +46,7 @@ for OPT in $* ; do
 	-o|--optim)   OPTIM=1 ;;
 	-h|--help) usage ; exit 0 ;;
 	# pass unknown opts to ./configure
-	*) CONFOPT="$CONFOPT $OPT" ;;
+	*) CONFOPT="$CONFOPT \"$OPT\"" ;;
     esac
 done
 
@@ -82,21 +81,21 @@ fi
 echo "--> libtoolize..."
 # this script won't rewrite the files if they already exist. This is a
 # PITA when you want to upgrade libtool, thus I'm setting --force
-libtoolize --force
+#libtoolize --force
 
 # prepare everything
 echo "--> aclocal..."
-aclocal$AMVERS -I m4
+#aclocal$AMVERS -I m4
 
 # applications should provide a config.h for now
 echo "--> autoheader..."
-autoheader
+#autoheader
 
 echo "--> automake..."
-automake$AMVERS --add-missing
+#automake$AMVERS --add-missing
 
 echo "--> autoconf..."
-autoconf
+#autoconf
 
 #### start configure with special environment
 
@@ -107,4 +106,4 @@ export CPP="$COMP -E"
 export CFLAGS="$COMPFLAGS"
 export CXXFLAGS="$COMPFLAGS"
 
-./configure $DEFAULTCONFOPT $CONFOPT
+eval ./configure $DEFAULTCONFOPT $CONFOPT
-- 
GitLab