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
# Other compilers
if test x$x_have_cpu_sse2 = xtrue; then
SILC_ADD_CFLAGS(-msse2)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
fi
if test x$x_have_cpu_pni = xtrue; then
SILC_ADD_CFLAGS(-msse3)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
fi
if test x$x_have_cpu_ssse3 = xtrue; then
SILC_ADD_CFLAGS(-mssse3)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
fi
- if test x$x_have_cpu_sse4 = xtrue; then
+ if test x$x_have_cpu_sse4_1 = xtrue; then
SILC_ADD_CFLAGS(-msse4)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
+ fi
+ if test x$x_have_cpu_sse4_2 = xtrue; then
+ SILC_ADD_CFLAGS(-msse4)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
+ fi
+ if test x$x_have_cpu_sse5 = xtrue; then
+ SILC_ADD_CFLAGS(-msse5)
+ SILC_ADD_CFLAGS(-ftree-vectorize)
fi
fi
fi
*-*-*bsd*)
check_threads=false
;;
+ *-*-*darwin*)
+ check_threads=true
+ ;;
*)
check_threads=true
;;
# Check for epoll_wait and verify that epoll_create works
AC_CHECK_FUNC(epoll_wait,
[
- AC_RUN_IFELSE(
+ AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <sys/epoll.h>
int main()
close(ret);
return 0;
}
- ],
+ ])],
[
AC_DEFINE([HAVE_EPOLL_WAIT], [1], [HAVE_EPOLL_WAIT])
],
# 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
],
fi
if test x$va_copy = xfalse; then
- AC_RUN_IFELSE(
+ AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <stdarg.h>
#include <stdlib.h>
{
return t(0, 0xff11);
}
- ],
+ ])],
[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)
-AC_RUN_IFELSE(
+AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <stdio.h>
#include <time.h>
timezone = 0;
return 0;
}
- ],
+ ])],
[ AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_TIMEZONE], [], [HAVE_TIMEZONE]) ],
[ AC_MSG_RESULT(no) ],
[ AC_MSG_RESULT(no) ]
)
AC_MSG_CHECKING(whether system has tm_gmtoff)
-AC_RUN_IFELSE(
+AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <stdio.h>
#include <time.h>
tm.tm_gmtoff = 0;
return 0;
}
- ],
+ ])],
[ AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_TM_GMTOFF], [], [HAVE_TM_GMTOFF]) ],
[ AC_MSG_RESULT(no) ],
[ AC_MSG_RESULT(no) ]
)
AC_MSG_CHECKING(whether system has __tm_gmtoff)
-AC_RUN_IFELSE(
+AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <stdio.h>
#include <time.h>
tm.__tm_gmtoff = 0;
return 0;
}
- ],
+ ])],
[ AC_MSG_RESULT(yes)
AC_DEFINE([HAVE___TM_GMTOFF], [], [HAVE___TM_GMTOFF]) ],
[ AC_MSG_RESULT(no) ],
[ AC_MSG_RESULT(no) ]
)
AC_MSG_CHECKING(whether system has __tm_gmtoff__)
-AC_RUN_IFELSE(
+AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <stdio.h>
#include <time.h>
tm.__tm_gmtoff__ = 0;
return 0;
}
- ],
+ ])],
[ AC_MSG_RESULT(yes)
AC_DEFINE([HAVE___TM_GMTOFF__], [], [HAVE___TM_GMTOFF__]) ],
[ AC_MSG_RESULT(no) ],
AC_DEFINE([SILC_ALIGNMENT], SILC_SIZEOF_VOID_P, [SILC_ALIGNMENT])
])
-# Stack trace checking
-AC_MSG_CHECKING(whether to enable stack tracing)
-AC_ARG_ENABLE(stack-trace,
- [ --enable-stack-trace enable memory stack trace],
+# Memory trace checking
+__SILC_ENABLE_MEMTRACE=""
+AC_MSG_CHECKING(whether to enable memory tracing)
+AC_ARG_ENABLE(mem-trace,
+ [ --enable-mem-trace enable memory tracing],
[
case "${enableval}" in
yes)
AC_MSG_RESULT(yes)
- AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
+ AC_DEFINE([SILC_MEMTRACE], [], [SILC_MEMTRACE])
+ __SILC_ENABLE_MEMTRACE="#define __SILC_ENABLE_MEMTRACE 1"
CFLAGS="$CFLAGS -rdynamic"
+ PC_CFLAGS="$PC_CFLAGS -rdynamic"
;;
*)
AC_MSG_RESULT(no)
[
AC_MSG_RESULT(no)
])
+
+AC_MSG_CHECKING(whether to have verbose compilation)
+AC_ARG_ENABLE(verbose,
+ [ --enable-verbose have verbose compilation],
+ [
+ case "${enableval}" in
+ yes)
+ AC_MSG_RESULT(yes)
+
+ # Add here any options to give verbose compilation output
+ SILC_ADD_CFLAGS(-ftree-vectorizer-verbose=2)
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ ;;
+ esac
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
#endif SILC_DIST_INPLACE
# Debug checking
yes)
AC_MSG_RESULT(yes)
AC_DEFINE([SILC_DEBUG], [], [enable-debug])
+ PC_CFLAGS="$PC_CFLAGS -DSILC_DEBUG"
summary_debug="yes"
__SILC_ENABLE_DEBUG="#define __SILC_ENABLE_DEBUG 1"
;;
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
AC_MSG_RESULT(no)
AC_CHECK_HEADERS(iconv.h,
[
- AC_CHECK_FUNCS(iconv,
+ # Default check for iconv in C-library
+ AC_CHECK_FUNCS(iconv iconv_open iconv_close,
[
has_iconv=true
check_iconv=false
])
if test x$check_iconv = xtrue; then
+ # Check for iconv in libiconv installed under /usr
AC_MSG_RESULT(Searching for iconv...)
# XXX
AC_CHECK_HEADERS(iconv.h,
[
LIBS="$LIBS -liconv"
+ LDFLAGS="$LDFLAGS -L/usr/lib"
+ CFLAGS="$CFLAGS -I/usr/include"
+ CPPLAGS="$CPPFLAGS -I/usr/include"
+
AC_MSG_CHECKING(for iconv in -liconv)
AC_TRY_LINK(
[
SAVE_LDFLAGS="$LDFLAGS"
SAVE_CPPFLAGS="$CPPFLAGS"
- for dir in `echo "/usr/local /usr/pkg /usr/contrib"`; do
+ for dir in `echo "/usr/local /usr/pkg /usr/contrib /opt/local"`; do
if test x$has_iconv = xfalse; then
AC_MSG_RESULT(searching in $dir...)
# (2) In glibc-2.1.2 and earlier there is a bug that messes up ob and
# obl when args 2 and 3 are 0 (fixed in glibc-2.1.3).
#
- AC_CACHE_CHECK([whether this iconv is good enough], ac_iconv_good,
+ AC_CACHE_CHECK([whether this iconv is good enough], ac_cv_iconv_good,
AC_TRY_RUN(
[
#include <iconv.h>
}
],
[
- ac_iconv_good=yes
+ ac_cv_iconv_good=yes
],
[
- ac_iconv_good=no
+ ac_cv_iconv_good=no
],
[
- ac_iconv_good=yes
+ ac_cv_iconv_good=yes
])
)
- if test x$ac_iconv_good = xno; then
+ if test x$ac_cv_iconv_good = xno; then
AC_MSG_RESULT(Try using libiconv instead.)
fi
fi
# Check for read/write locks
AC_CHECK_FUNC(pthread_rwlock_init,
[
- AC_RUN_IFELSE(
+ AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <pthread.h>
int main()
pthread_rwlock_destroy(&rwlock);
return 0;
}
- ],
+ ])],
[],
[
# Rwlock not defined
AC_DEFINE([SILC_HAVE_PTHREAD], [], [HAVE_PTHREAD])
AC_DEFINE([SILC_THREADS], [], [HAVE_THREAD])
__SILC_HAVE_PTHREAD="#define __SILC_HAVE_PTHREAD 1"
+ PC_CFLAGS="$PC_CFLAGS -DSILC_THREADS"
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
##
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(SILC_LIB_INCLUDES)
+AC_SUBST(PC_CFLAGS)
AC_SUBST(__SILC_ENABLE_DEBUG)
+AC_SUBST(__SILC_ENABLE_MEMTRACE)
AC_SUBST(__SILC_HAVE_PTHREAD)
AC_SUBST(__RUNTIME_PACKAGE_VERSION)
Makefile
doc/Makefile
doc/runtime.in/index.html
+doc/runtime.in/manual.html
Makefile.defines
Makefile.defines_int
includes/Makefile
lib/silcutil/unix/Makefile
lib/silcutil/win32/Makefile
lib/silcutil/symbian/Makefile
+lib/silchttp/Makefile
+lib/silchttp/tests/Makefile
lib/srt.pc
)