AC_PREREQ(2.50)
+AC_CANONICAL_HOST
+
AM_INIT_AUTOMAKE(nettle, 1.5)
AM_CONFIG_HEADER(config.h)
LDFLAGS="-L `echo $with_lib_path | sed 's/:/ -L /g'`"
fi
+AC_ARG_ENABLE(assembler,
+AC_HELP_STRING([--enable-assebler],[enable assembler code [default=yes]]),
+[ case $enableval in
+yes|no) ;;
+*) AC_MSG_ERROR([bad value $enableval for --enable-assembler, need yes or no]) ;;
+esac],
+[enable_assembler=yes])
+
LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \
`echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
/usr/local/lib /sw/local/lib /sw/lib \
AC_ERROR([the C compiler doesn't handle ANSI-C])
fi
+# Select assembler code
+path=
+case "$host" in
+ [i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*])
+ path=x86
+ ;;
+ *sparc*-*-*)
+ path=sparc
+ ;;
+esac
+
+echo "enable_assembler: $enable_assembler, path: $path"
+
+if test "$enable_assembler" = yes ; then
+ if test -n "$path"; then
+ found=no
+ for tmp_f in aes aes_tables; do
+ echo "Looking for $path/$tmp_f.asm"
+ if test -f "$path/$tmp_f.asm"; then
+ echo found
+ found=yes
+ AC_CONFIG_LINKS($tmp_f.asm:$path/$tmp_f.asm)
+ fi
+ done
+ if test "$found" = no; then
+ enable_assembler=no
+ AC_MSG_WARN([No assembler files found.])
+ fi
+ fi
+fi
+
AC_PATH_PROG(M4, m4, m4)
# Checks for typedefs, structures, and compiler characteristics.