diff -ru gnumeric-1.12.1.old/configure.ac gnumeric-1.12.1/configure.ac
--- gnumeric-1.12.1.old/configure.ac	2013-03-02 00:00:37.000000000 +0100
+++ gnumeric-1.12.1/configure.ac	2013-03-09 22:03:58.000000000 +0100
@@ -269,7 +269,7 @@
 			 -Wchar-subscripts -Wwrite-strings \
 			 -Wdeclaration-after-statement -Wnested-externs \
 			 -Wmissing-noreturn \
-			 -Werror=missing-prototypes -Werror=nested-externs \
+			 -Werror=missing-prototypes \
 			 -Werror=implicit-function-declaration \
 			 -Wmissing-declarations -Wno-pointer-sign \
 			 -Werror=format-security -Wbitwise -Wcast-to-as \
diff -ru gnumeric-1.12.1.old/configure gnumeric-1.12.1/configure
--- gnumeric-1.12.1.old/configure	2013-03-02 00:01:20.000000000 +0100
+++ gnumeric-1.12.1/configure	2013-03-09 22:04:35.000000000 +0100
@@ -6756,7 +6756,8 @@
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+	test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
@@ -7157,10 +7158,6 @@
   fi
   ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
 haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
@@ -7199,7 +7196,7 @@
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -8296,7 +8293,14 @@
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
+	    case `/usr/bin/file conftest.o` in
+	      *x86-64*)
+		LD="${LD-ld} -m elf32_x86_64"
+		;;
+	      *)
+		LD="${LD-ld} -m elf_i386"
+		;;
+	    esac
 	    ;;
 	  ppc64-*linux*|powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
@@ -9870,7 +9874,7 @@
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
       # old Intel for x86_64 which still supported -KPIC.
       ecc*)
@@ -12040,17 +12044,6 @@
   esac
   ;;
 
-gnu*)
-  version_type=linux # correct to gnu/linux during the next big refactor
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
 haiku*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
@@ -12167,7 +12160,7 @@
   ;;
 
 # This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
@@ -14212,7 +14205,7 @@
 			 -Wchar-subscripts -Wwrite-strings \
 			 -Wdeclaration-after-statement -Wnested-externs \
 			 -Wmissing-noreturn \
-			 -Werror=missing-prototypes -Werror=nested-externs \
+			 -Werror=missing-prototypes \
 			 -Werror=implicit-function-declaration \
 			 -Wmissing-declarations -Wno-pointer-sign \
 			 -Werror=format-security -Wbitwise -Wcast-to-as \
