Index: configure
===================================================================
--- configure	(revision ff1e0f38b2bf523763024876e746508c1928685e)
+++ configure	(revision 534e4e460878f8a2e7d24b4a0413515e6acd1dae)
@@ -2520,4 +2520,7 @@
 
 
+
+
+
 am__api_version='1.15'
 
@@ -3217,9 +3220,10 @@
 #==============================================================================
 # Installation paths
-if test "x$prefix" = "xNONE"; then
-	cfa_prefix=${ac_default_prefix}
-else
-	cfa_prefix=${prefix}
-fi
+
+	if test "x$prefix" = "xNONE"; then
+		cfa_prefix=${ac_default_prefix}
+	else
+		cfa_prefix=${prefix}
+	fi
 
 cat >>confdefs.h <<_ACEOF
@@ -3227,12 +3231,12 @@
 _ACEOF
 
-CFA_PREFIX=${cfa_prefix}
-
-
-if test "$includedir" = '${prefix}/include'; then
- 	cfa_incdir="${cfa_prefix}/include/${cfa_name}"
-else
- 	cfa_incdir=${includedir}
-fi
+	CFA_PREFIX=${cfa_prefix}
+
+
+	if test "$includedir" = '${prefix}/include'; then
+		cfa_incdir="${cfa_prefix}/include/${cfa_name}"
+	else
+		cfa_incdir=${includedir}
+	fi
 
 cat >>confdefs.h <<_ACEOF
@@ -3240,12 +3244,12 @@
 _ACEOF
 
-CFA_INCDIR=${cfa_incdir}
-
-
-if test "$bindir" = '${exec_prefix}/bin'; then
- 	cfa_bindir="${cfa_prefix}/bin"
-else
- 	cfa_bindir=${bindir}
-fi
+	CFA_INCDIR=${cfa_incdir}
+
+
+	if test "$bindir" = '${exec_prefix}/bin'; then
+		cfa_bindir="${cfa_prefix}/bin"
+	else
+		cfa_bindir=${bindir}
+	fi
 
 cat >>confdefs.h <<_ACEOF
@@ -3253,12 +3257,12 @@
 _ACEOF
 
-CFA_BINDIR=${cfa_bindir}
-
-
-if test "$libdir" = '${exec_prefix}/lib'; then
- 	cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
-else
- 	cfa_libdir=${libdir}
-fi
+	CFA_BINDIR=${cfa_bindir}
+
+
+	if test "$libdir" = '${exec_prefix}/lib'; then
+		cfa_libdir="${cfa_prefix}/lib/${cfa_name}"
+	else
+		cfa_libdir=${libdir}
+	fi
 
 cat >>confdefs.h <<_ACEOF
@@ -3266,5 +3270,6 @@
 _ACEOF
 
-CFA_LIBDIR=${cfa_libdir}
+	CFA_LIBDIR=${cfa_libdir}
+
 
 
@@ -3310,11 +3315,10 @@
 do
 	#strip quotes surrouding values
-	var=$(echo $var | sed s/\'//g)
 	case $var in
 		# skip cross compilation related arguments
-		--host=*) ;; host_alias=*) ;; --build=*) ;; build_alias=*) ;; --target=*) ;; target_alias=*) ;;
+		\'--host=*) ;; \'host_alias=*) ;; \'--build=*) ;; \'build_alias=*) ;; \'--target=*) ;; \'target_alias=*) ;;
 
 		# skip the target hosts
-		--with-target-hosts=*) ;;
+		\'--with-target-hosts=*) ;;
 
 		# append all other arguments to the sub configure arguments
@@ -3415,6 +3419,23 @@
 do
 	# call your procedure/other scripts here below
-	lib_arch=$(echo $i | sed -r "s/:(.*)//g")
+	arch_name=$(echo $i | sed -r "s/:(.*)//g")
 	lib_config=$(echo $i | sed -r "s/(.*)://g")
+	if test $lib_config != "nodebug";
+	then
+		if test $lib_config != "debug";
+		then
+			if test $lib_config != "nolib";
+			then
+				>&2 echo "Configuration must be 'debug', 'nodebug' or 'nolib'"
+				exit 1
+			fi
+		fi
+	fi
+
+	lib_arch=$($ac_aux_dir/config.sub $arch_name)
+	if test "$?" != "0"; then
+		>&2 echo "Unkown architecture " $arch_name;
+		exit 1;
+	fi
 	lib_dir="libcfa-${lib_arch}-${lib_config}"
 
