From 66681e0a54de20c78a324a7517eed608ba6e5b51 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Mon, 7 Nov 2005 22:32:13 +0100
Subject: [PATCH] Use $host_cpu, not $host, when setting up the assembler path.
 Use $host_os, not uname, when setting up shared library flags.

Rev: src/nettle/configure.ac:1.69
---
 configure.ac | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 047cc82f..e8ac3b5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -102,11 +102,11 @@ fi
 
 # Select assembler code
 asm_path=
-case "$host" in
-  [i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*])
+case "$host_cpu" in
+  [i?86* | k[5-8]* | pentium* | athlon])
     asm_path=x86
     ;;
-  *sparc*-*-*)
+  *sparc*)
     AC_TRY_COMPILE([
 #if defined(__sparcv9) || defined(__arch64__)
 #error 64-bit sparc
@@ -148,8 +148,8 @@ LSH_CCPIC
 
 SHLIBCFLAGS="$CCPIC"
 
-case `uname -sr` in
-  CYGWIN*)
+case "$host_os" in
+  cygwin*)
     SHLIBFORLINK='cygnettle-$(SHLIBMAJOR)-$(SHLIBMINOR).dll'
     SHLIBSONAME=''
     SHLIBFILE='libnettle.dll.a'
@@ -356,6 +356,10 @@ if test x$GCC = xyes ; then
   else
     CFLAGS="$CFLAGS -ggdb3"
   fi
+  # FIXME: It would be better to actually test if this option works and/or is needed.
+  if "$CC" --version | grep 'gcc.* 4\.' 1>/dev/null 2>&1; then
+    CFLAGS="$CFLAGS -Wno-pointer-sign"
+  fi
   CFLAGS="$CFLAGS -Wall -W \
   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \
   -Wpointer-arith -Wbad-function-cast -Wnested-externs"
-- 
GitLab