Added memory corruption checks to stacktrace.c
[runtime.git] / configure.ad
index 3fad742985fb10bc4978605984b66e60ca0c8a97..5b6c9510ea798d671642b2a8eaa34673ff01374d 100644 (file)
@@ -19,7 +19,7 @@ AD_INIT
 AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE
 AC_PREREQ(2.52)
-AC_CONFIG_HEADERS(silcdefs.h)
+AC_CONFIG_HEADERS(runtimedefs.h)
 
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
@@ -260,7 +260,7 @@ AC_HEADER_STAT
 
 # More header checking
 #
-AC_CHECK_HEADERS(unistd.h string.h errno.h fcntl.h assert.h)
+AC_CHECK_HEADERS(unistd.h string.h errno.h fcntl.h assert.h execinfo.h)
 AC_CHECK_HEADERS(sys/types.h sys/stat.h sys/time.h stddef.h)
 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h xti.h netdb.h sys/resource.h)
 AC_CHECK_HEADERS(pwd.h grp.h termcap.h paths.h)
@@ -382,7 +382,7 @@ AC_CHECK_FUNCS(chmod fcntl stat fstat getenv putenv strerror)
 AC_CHECK_FUNCS(getpid getgid getsid getpgid getpgrp getuid sched_yield)
 AC_CHECK_FUNCS(setgroups initgroups nl_langinfo nanosleep)
 AC_CHECK_FUNCS(strchr snprintf strstr strcpy strncpy memcpy memset memmove)
-AC_CHECK_FUNCS(setenv getenv putenv unsetenv clearenv)
+AC_CHECK_FUNCS(setenv getenv putenv unsetenv clearenv backtrace)
 
 # Check getopt_long
 AC_CHECK_FUNC(getopt_long,
@@ -725,6 +725,7 @@ AC_ARG_ENABLE(stack-trace,
     yes)
       AC_MSG_RESULT(yes)
       AC_DEFINE([SILC_STACKTRACE], [], [SILC_STACKTRACE])
+      CFLAGS="$CFLAGS -rdynamic"
       ;;
     *)
       AC_MSG_RESULT(no)
@@ -1186,6 +1187,26 @@ if test x$has_threads = xtrue; then
 fi
 
 
+##
+## Native WIN32 compilation under cygwin
+##
+AC_MSG_CHECKING(whether to compile native WIN32 code)
+AC_ARG_WITH(win32,
+  [  --with-win32            compile native WIN32 (MinGW) code (-mno-cygwin)],
+  [
+    AC_MSG_RESULT(yes)
+    AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
+    win32_support=true
+    CFLAGS="-mno-cygwin $CFLAGS"
+    LIBS="$LIBS -lwsock32"
+  ],
+  [
+    AC_MSG_RESULT(no)
+    win32_support=false
+  ])
+AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
+
+
 ##
 ## Outputs and substitutions
 ##
@@ -1199,9 +1220,6 @@ AC_SUBST(__SILC_ENABLE_DEBUG)
 AC_SUBST(__SILC_HAVE_PTHREAD)
 AC_SUBST(__RUNTIME_PACKAGE_VERSION)
 
-# Native Windows support (disabled by default)
-AM_CONDITIONAL(SILC_WIN32, test xfalse = xtrue)
-
 # Native Symbian OS support (disabled by default)
 AM_CONDITIONAL(SILC_SYMBIAN, test xfalse = xtrue)
 
@@ -1219,6 +1237,9 @@ AC_DEFINE_UNQUOTED([SILC_DOCDIR], "$DOCDIR", [SILC_DOCDIR])
 INCLUDE_DEFINES_INT="include \$(top_srcdir)/Makefile.defines_int"
 AC_SUBST(INCLUDE_DEFINES_INT)
 
+DATE=`date`
+AC_SUBST(DATE)
+
 
 #
 # Makefile outputs
@@ -1226,11 +1247,10 @@ AC_SUBST(INCLUDE_DEFINES_INT)
 AC_CONFIG_FILES(
 Makefile
 doc/Makefile
+doc/runtime.in/index.html
 Makefile.defines
 Makefile.defines_int
 includes/Makefile
-includes/silcversion.h
-includes/silc.h
 apps/Makefile
 win32/Makefile
 )