Processor checks.
[silc.git] / configure.ad
index f88c59c7ff5d9d1729d75a310aca42d0492fc582..a4a9d403a8fa4b33f6260f2a4a1889b2886a4149 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  Author: Pekka Riikonen <priikone@silcnet.org>
 #
-#  Copyright (C) 2000 - 2005 Pekka Riikonen
+#  Copyright (C) 2000 - 2006 Pekka Riikonen
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -44,6 +44,25 @@ case "$target" in
     ;;
 esac
 
+# Get CPU
+case "$host_cpu" in
+  i386)
+    AC_DEFINE([SILC_I386], [], [SILC_I386])
+    ;;
+  i?86)
+    AC_DEFINE([SILC_I486], [], [SILC_I486])
+    ;;
+  x86_64)
+    AC_DEFINE([SILC_X86_64], [], [SILC_X86_64])
+    ;;
+  powerpc*)
+    AC_DEFINE([SILC_POWERPC], [], [SILC_POWERPC])
+    ;;
+  ia64)
+    AC_DEFINE([SILC_IA64], [], [SILC_IA64])
+    ;;
+esac
+
 # Control compiler optimizations
 CFLAGS=`echo $CFLAGS | sed 's/-O[ 0123456789s]*//g'`