Added --with-alignment.
[silc.git] / lib / configure.ad
index fefae05bbf48b3636ee5fe9082a59e1463db0c51..d9b6ba39fdfea5d7cc848d52b8bb2529e019b656 100644 (file)
@@ -18,6 +18,8 @@
 
 if test x$compile_libs = xtrue; then
 
+AM_PROG_AS
+
 ##
 ## Will compile included libs
 ##
@@ -142,6 +144,21 @@ AC_CHECK_FUNC(epoll_wait,
     )
   ])
 
+#
+# Memory alignment.  User can specify what alignment memory allocation and
+# SilcStack allocation use.  Default is system default alignemnt.
+#
+AC_ARG_WITH(alignment,
+  [  --with-alignment=NUMBER  Memory alignment in bytes],
+  [
+    AC_DEFINE_UNQUOTED([SILC_ALIGNMENT], [$withval], [SILC_ALIGNMENT])
+    AC_MSG_RESULT(Memory allocation alignment is $withval bytes)
+  ],
+  [
+    AC_DEFINE([SILC_ALIGNMENT], SILC_SIZEOF_VOID_P, [SILC_ALIGNMENT])
+  ])
+
+
 MODULESDIR="$silc_prefix/lib/modules"
 #ifdef SILC_DIST_SIM
 # SIM modules directory