dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.in,v 1.13.2.27 2000/11/29 00:33:15 zarq Exp $
+dnl $Id: configure.in,v 1.13.2.28 2000/11/29 01:37:50 zarq Exp $
AC_INIT(src/tincd.c)
AM_INIT_AUTOMAKE(tinc, 1.0pre4-cvs)
AM_GNU_GETTEXT
-dnl Crypto stuff
-tinc_OPENSSL
-
dnl Support for SunOS
AC_CHECK_FUNC(socket, [], [
])
-dnl Check for TUN/TAP support in the kernel
+dnl These are defined in files in m4/
tinc_TUNTAP
+tinc_OPENSSL
+tinc_SCANF_AS
+
dnl Check if checkpoint tracing has to be enabled
AC_ARG_ENABLE(tracing,
--- /dev/null
+dnl Check for a scanf that understands about %as as format specifier
+
+AC_DEFUN(tinc_SCANF_AS,
+[
+ AC_CACHE_CHECK([for a scanf that groks %as], tinc_cv_scanf_as,
+ [
+ AC_TRY_RUN([
+/* Very naive program which will probably give a segmentation
+ fault if the sscanf doesn't work as expected. */
+#include <stdio.h>
+int main() {
+ char*s = NULL;
+ sscanf("string\n", "%as\n", &s);
+ if(s == NULL)
+ return 1;
+ return strcmp("string", s);
+}
+ ], [tinc_cv_scanf_as="yes"], [tinc_cv_scanf_as="no"])
+ ])
+
+if test "$tinc_cv_scanf_as" = "yes" ; then
+ AC_DEFINE(HAVE_SCANF_AS)
+ AC_SUBST(HAVE_SCANF_AS)
+fi
+])