SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
- SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
+ SILC_CPU_FLAG(sse4a, true, AC_DEFINE([SILC_CPU_SSE4A], [], [SILC_CPU_SSE4A]), [])
+ SILC_CPU_FLAG(sse4_1, true, AC_DEFINE([SILC_CPU_SSE41], [], [SILC_CPU_SSE41]), [])
+ SILC_CPU_FLAG(sse4_2, true, AC_DEFINE([SILC_CPU_SSE42], [], [SILC_CPU_SSE42]), [])
+ SILC_CPU_FLAG(sse5, true, AC_DEFINE([SILC_CPU_SSE5], [], [SILC_CPU_SSE5]), [])
;;
# Intel IA-64, 64-bit CPU (not x86_64 compatible)
ia64)
AC_DEFINE([SILC_IA64], [], [SILC_IA64])
cpu_ia64=true
-
- # Check for specific CPU features
- SILC_CPU_FLAG(mmx, true, AC_DEFINE([SILC_CPU_MMX], [], [SILC_CPU_MMX]), [])
- SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
- SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
- SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
- SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
;;
# AMD/Intel x86_64, 64-bit CPU
SILC_CPU_FLAG(sse2, true, AC_DEFINE([SILC_CPU_SSE2], [], [SILC_CPU_SSE2]), [])
SILC_CPU_FLAG(pni, true, AC_DEFINE([SILC_CPU_SSE3], [], [SILC_CPU_SSE3]), [])
SILC_CPU_FLAG(ssse3, true, AC_DEFINE([SILC_CPU_SSSE3], [], [SILC_CPU_SSSE3]), [])
- SILC_CPU_FLAG(sse4, true, AC_DEFINE([SILC_CPU_SSE4], [], [SILC_CPU_SSE4]), [])
+ SILC_CPU_FLAG(sse4a, true, AC_DEFINE([SILC_CPU_SSE4A], [], [SILC_CPU_SSE4A]), [])
+ SILC_CPU_FLAG(sse4_1, true, AC_DEFINE([SILC_CPU_SSE41], [], [SILC_CPU_SSE41]), [])
+ SILC_CPU_FLAG(sse4_2, true, AC_DEFINE([SILC_CPU_SSE42], [], [SILC_CPU_SSE42]), [])
+ SILC_CPU_FLAG(sse5, true, AC_DEFINE([SILC_CPU_SSE5], [], [SILC_CPU_SSE5]), [])
;;
# PowerPC, 32-bit and 64-bit CPUs
# Set some compiler options based on CPU
if test "x$CC" = "xicc"; then
# ICC flags
- if test x$x_have_cpu_sse4 = xtrue; then
+ if test x$x_have_cpu_sse4_1 = xtrue; then
SILC_ADD_CFLAGS(-axS)
fi
if test x$x_have_cpu_ssse3 = xtrue; then
if test x$x_have_cpu_ssse3 = xtrue; then
SILC_ADD_CFLAGS(-mssse3)
fi
- if test x$x_have_cpu_sse4 = xtrue; then
+ if test x$x_have_cpu_sse4_1 = xtrue; then
SILC_ADD_CFLAGS(-msse4)
fi
fi
# Check for va_copy
va_copy=false
+__SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) dest = src"
AC_MSG_CHECKING(for va_copy)
AC_TRY_COMPILE(
[
}
],
[
- AC_DEFINE([HAVE_VA_COPY], [], [HAVE_VA_COPY])
+ __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) va_copy(dest, src)"
AC_MSG_RESULT(yes)
va_copy=true
],
}
],
[
- AC_DEFINE([HAVE___VA_COPY], [], [HAVE___VA_COPY])
+ __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) __va_copy(dest, src)"
AC_MSG_RESULT(yes)
va_copy=true
],
[va_copy=false],
[
AC_DEFINE([SILC_VA_COPY_ARRAY], [], [SILC_VA_COPY_ARRAY])
+ __SILC_VA_COPY="#define __SILC_VA_COPY(dest, src) memmove(dest, src, sizeof(va_list))"
],
[va=copy=false]
)
fi
+AC_SUBST(__SILC_VA_COPY)
# Check for timezone and tm_gmtoff for timezone information
AC_MSG_CHECKING(whether system has timezone)
SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/contrib"
SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silcutil"
+SILC_LIB_INCLUDES="$SILC_LIB_INCLUDES -I$SILC_TOP_SRCDIR/lib/silchttp"
# Check for iconv support
fi
+# Check for Expat
+AC_ARG_WITH(expat,
+ [[ --with-expat[=DIR] use Expat XML [search in DIR/include and DIR/lib]]],
+ [
+ case "${withval}" in
+ no)
+ ;;
+ *)
+ if test -d $withval/include; then
+ CPPFLAGS="$CPPFLAGS -I$withval/include"
+ CFLAGS="$CFLAGS -I$withval/include"
+ fi
+ if test -d $withval/lib; then
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ fi
+ ;;
+ esac
+ ])
+
+AC_CHECK_HEADERS(expat.h,
+ [ LIBS="$LIBS -lexpat" ],
+ [ AC_MSG_ERROR(Expat XML Library is required to compile SRT) ])
+
+
##
## Native WIN32 compilation under cygwin
##
lib/silcutil/unix/Makefile
lib/silcutil/win32/Makefile
lib/silcutil/symbian/Makefile
+lib/silchttp/Makefile
+lib/silchttp/tests/Makefile
lib/srt.pc
)