updates.
[silc.git] / configure.ad
index d98e4db2d2713e44f0f23e614ac7648303f08831..373a6b982e0690d004a55a9facbac2de6d4f91ca 100644 (file)
@@ -53,7 +53,8 @@ case "$target" in
 esac
 
 # Get CPU
-SILC_SYSTEM_IS_SMP(AC_DEFINE([SILC_SMP], [], [SILC_SMP]), [])
+SILC_SYSTEM_IS_SMP(AC_DEFINE([SILC_SMP], [], [SILC_SMP]), [],
+                   AC_DEFINE([SILC_SMP], [], [SILC_SMP]))
 cpu_i386=false
 cpu_i486=false
 cpu_i586=false
@@ -141,6 +142,17 @@ AC_PROG_CC
 AC_C_INLINE
 AC_C_CONST
 
+# Set some compiler options based on CPU
+if test x$x_have_cpu_sse2 = xtrue; then
+  SILC_ADD_CFLAGS(-msse2)
+fi
+if test x$x_have_cpu_sse3 = xtrue; then
+  SILC_ADD_CFLAGS(-msse3)
+fi
+if test x$x_have_cpu_ssse3 = xtrue; then
+  SILC_ADD_CFLAGS(-mssse3)
+fi
+
 __SILC_HAVE_PTHREAD=""
 __SILC_HAVE_SIM=""
 __SILC_ENABLE_DEBUG=""