diff --git a/ChangeLog b/ChangeLog
index 4e1744fb302188cab5957230dfb3a3a874ac0e1c..6746f983713cc14022851cda0b5e19dddeac773c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1999-10-25  Andreas Schwab  <schwab@suse.de>
+
+	* configure: Fix quoting inside arguments of eval.
+
 1999-10-21  Nick Clifton  <nickc@cygnus.com>
 
 	* config-ml.in: Allow suppression of some ARM multilibs.
diff --git a/configure b/configure
index a7d3cb8b1e2f464adf0806eda447c135c0cd56f0..bcb5038bb6eed2a6b16c954476bba3c752aa4329 100755
--- a/configure
+++ b/configure
@@ -86,7 +86,7 @@ subdirs=
 target_alias=NOTARGET
 target_makefile_frag=
 undefs=NOUNDEFS
-version="$Revision: 1.22 $"
+version="$Revision: 1.23 $"
 x11=default
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
@@ -237,7 +237,7 @@ do
 		esac
 
 		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval "$enableopt='$optarg'"
+		eval "$enableopt=\$optarg"
 		enableoptions="$enableoptions '$option'"
 		;;
 	--exec-prefix* | --ex*)
@@ -370,7 +370,7 @@ do
 		esac
 
 		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval $withopt="$optarg"
+		eval $withopt="\$optarg"
 		withoptions="$withoptions $option"
 		;;
 	--without-*)
@@ -913,7 +913,7 @@ if [ "${build}" != "${host}" ]; then
   tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
 
   for var in ${tools}; do
-    if [ -z "`eval 'echo $'"${var}"`" ] && [ -r Makefile ]; then
+    if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
       sed -n -e ':loop
 /\\$/ N
 s/\\\n//g
@@ -922,7 +922,7 @@ t loop
 	< Makefile > Makefile.v
       t=`tail -1 Makefile.v`
       if [ -n "${t}" ]; then
-	eval "${var}='${t}'"
+	eval "${var}=\${t}"
       fi
       rm -f Makefile.v
     fi
@@ -1420,7 +1420,7 @@ EOF
 	    # tools.
 	    if [ "${build}" != "${host}" ]; then
 		for var in ${tools}; do
-		    val=`eval 'echo $'"${var}"`
+		    eval val=\$${var}
 		    sed -e "/^${var}[ 	]*=/{
 			   :loop1
 			   /\\\\$/ N