Version bumped to 1.4.2.
[mdsms.git] / configure.in
index aab1afe..ce9176f 100644 (file)
@@ -2,7 +2,7 @@
 
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(mdsms.c)
-AM_INIT_AUTOMAKE(sms9110, 1.3)
+AM_INIT_AUTOMAKE(sms9110, 1.4.2)
 AM_CONFIG_HEADER(config.h)
 AM_MAINTAINER_MODE
 
@@ -134,9 +134,19 @@ for un in __unused__ unused;do
        done
 if $uns;then AC_DEFINE(ATTR_UNUSED,) AC_MSG_RESULT(no);fi
 
+AC_MSG_CHECKING([for printf style attribute])
+AC_TRY_COMPILE([#include <stddef.h>
+void testf(char *fmt,...) __attribute__((format(printf,1,2)));
+void testf(char *fmt,...) {}], [testf("%d",1);],
+       AC_DEFINE(HAVE_PRINTFORMAT) AC_MSG_RESULT(yes),
+                                   AC_MSG_RESULT(no)
+       )
+
 AC_CHECK_FUNC(snprintf, AC_DEFINE(HAVE_SNPRINTF))
 AC_CHECK_FUNC(vsnprintf, AC_DEFINE(HAVE_VSNPRINTF))
 
+AC_CHECK_FUNCS(siginterrupt)
+
 AC_TYPE_SIGNAL
 AC_TYPE_PID_T
 
@@ -146,12 +156,6 @@ dnl AC_TRY_COMPILE([#include <string.h>], [strdup("");],
 dnl    AC_DEFINE(HAVE_STRDUP)  AC_MSG_RESULT(yes),
 dnl    LIBOBJS="$LIBOBJS strdup.o" AC_MSG_RESULT(no))
 
-AC_MSG_CHECKING([for working %m in printf])
-AC_TRY_RUN([int main() { char s[100];
-       sprintf(s,"%m");
-       return(!(strcmp(s,"m") && strcmp(s,"%m")));
-       }],AC_DEFINE(PRINTF_WORKS_PM) AC_MSG_RESULT(yes),AC_MSG_RESULT(no),AC_MSG_RESULT(avoiding))
-
 GCC_NEED_DECLARATION(gethostname, [#include <unistd.h>])
 GCC_NEED_DECLARATION(kill,        [#include <sys/types.h>
 #include <signal.h>])
@@ -161,6 +165,7 @@ GCC_NEED_DECLARATION(vsnprintf,   [#include <stdio.h>
 GCC_NEED_DECLARATION(strdup,      [#include <string.h>])
 GCC_NEED_DECLARATION(usleep,      [#include <unistd.h>])
 GCC_NEED_DECLARATION(strcasecmp,  [#include <string.h>])
+GCC_NEED_DECLARATION(siginterrupt,[#include <signal.h>])
 
 # Final output.