Module Name: othersrc Committed By: lukem Date: Wed May 20 08:49:05 UTC 2009
Modified Files: othersrc/usr.bin/tnftp: configure.ac Log Message: Style tweaks. Use AC_LANG_PROGRAM() instead of AC_LANG_SOURCE() Add a check for strptime() requiring separators between conversions, and use our replacement one if it does. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.15 othersrc/usr.bin/tnftp/configure.ac:1.16 --- othersrc/usr.bin/tnftp/configure.ac:1.15 Sat Dec 20 15:18:39 2008 +++ othersrc/usr.bin/tnftp/configure.ac Wed May 20 08:49:05 2009 @@ -1,15 +1,15 @@ -# $NetBSD: configure.ac,v 1.15 2008/12/20 15:18:39 lukem Exp $ +# $NetBSD: configure.ac,v 1.16 2009/05/20 08:49:05 lukem Exp $ # # Process this file with autoconf to produce a configure script. AC_INIT([tnftp], [20070806], [lu...@netbsd.org]) AC_PREREQ([2.61]) -AC_REVISION([$Revision: 1.15 $]) +AC_REVISION([$Revision: 1.16 $]) AS_SHELL_SANITIZE AC_CONFIG_SRCDIR([tnftp.h]) -AC_CONFIG_AUX_DIR(build-aux) +AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_HEADERS([config.h]) # @@ -271,13 +271,12 @@ AS_IF([test "$ac_cv_type_long_long_int" = yes], [AC_MSG_CHECKING([*printf() support for %lld]) can_printf_longlong=no - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <stdio.h> -int main() { - char buf[100]; - sprintf(buf, "%lld", 4294967300LL); - return (strcmp(buf, "4294967300")); -} + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +$accheck_includes +]], [[ +char buf[100]; +sprintf(buf, "%lld", 4294967300LL); +exit(0 != strcmp(buf, "4294967300")); ]])], [AC_MSG_RESULT([yes]) can_printf_longlong=yes], @@ -285,13 +284,12 @@ [AC_MSG_RESULT([unknown - cross-compiling])]) AS_IF([test "$can_printf_longlong" != yes], [AC_MSG_CHECKING([*printf() support for %qd]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <stdio.h> -int main() { - char buf[100]; - sprintf(buf, "%qd", 4294967300LL); - return (strcmp(buf, "4294967300")); -} + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +$accheck_includes +]], [[ +char buf[100]; +sprintf(buf, "%qd", 4294967300LL); +exit(0 != strcmp(buf, "4294967300")); ]])], [AC_MSG_RESULT([yes]) can_printf_longlong=yes @@ -317,6 +315,22 @@ [AC_DEFINE([HAVE_POLL], [1])], [$accheck_includes])]) +AS_IF([test "$ac_cv_func_strptime" = yes], + [AC_MSG_CHECKING([if strptime() needs separators between conversions]) + AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +$accheck_includes +]], [[ +struct tm timebuf; +char * res; +memset(&timebuf, 0, sizeof(timebuf)); +res = strptime("20011122161900", "%Y%m%d%H%M%S", &timebuf); +exit(!res); +]])], + [AC_MSG_RESULT([no])], + [AC_MSG_RESULT([yes - using local version]) + AC_LIBOBJ([strptime])], + [AC_MSG_RESULT([unknown - cross-compiling])])]) + # Assume libedit is not up-to-date and force own version. # have_libedit=no @@ -375,10 +389,10 @@ # # Create the Makefiles. # -AC_SUBST(INCLUDES) -AC_SUBST(LIBEDIT) -AC_SUBST(LIBNETBSD) -AC_SUBST(LIBDEPENDS) +AC_SUBST([INCLUDES]) +AC_SUBST([LIBEDIT]) +AC_SUBST([LIBNETBSD]) +AC_SUBST([LIBDEPENDS]) AC_CONFIG_FILES([ Makefile