From 73e60377a708ea6d9e45c981b9b131df4d93e511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 30 Nov 2016 17:38:37 +0100 Subject: [PATCH 1/2] Modernize configure.in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After editting configure.in and running autoreconf with autoconf-2.69 and automake-1.15, make command failed because configure.in did not hook Automake. This patch allows to regenerate the scripts with contemporary autotools. Signed-off-by: Petr Písař --- INSTALL | 4 ++-- configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ configure.in | 42 ------------------------------------------ 3 files changed, 41 insertions(+), 44 deletions(-) create mode 100644 configure.ac delete mode 100644 configure.in diff --git a/INSTALL b/INSTALL index a2c8722..0cbcb35 100644 --- a/INSTALL +++ b/INSTALL @@ -19,8 +19,8 @@ diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change + The file `configure.ac' is used to create `configure' by a program +called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..2380b76 --- /dev/null +++ b/configure.ac @@ -0,0 +1,39 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT([time], [1.7]) +AM_INIT_AUTOMAKE() + +AC_ARG_PROGRAM + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_INSTALL + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SIGNAL + +AC_MSG_CHECKING(for struct timeval in sys/time.h) +AC_EGREP_HEADER(tv_usec, sys/time.h, have_tv=yes, have_tv=no) +AC_MSG_RESULT($have_tv) +test $have_tv = yes && AC_DEFINE(HAVE_TIMEVAL) + +dnl Checks for library functions. +AC_FUNC_VPRINTF +AC_FUNC_WAIT3 +AC_CHECK_FUNCS(strerror) + +AC_MSG_CHECKING(for getpagesize) +AC_TRY_LINK([#include ], +[getpagesize();], have_gp=yes, have_gp=no) +AC_MSG_RESULT($have_gp) +test $have_gp = yes && AC_DEFINE(HAVE_GETPAGESIZE) + +AC_OUTPUT(Makefile) diff --git a/configure.in b/configure.in deleted file mode 100644 index 1531bad..0000000 --- a/configure.in +++ /dev/null @@ -1,42 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -AC_INIT(time.c) -VERSION=1.7 -AC_SUBST(VERSION) -PACKAGE=time -AC_SUBST(PACKAGE) - -AC_ARG_PROGRAM - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_INSTALL - -dnl Checks for header files. -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS(unistd.h string.h sys/rusage.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_SIGNAL - -AC_MSG_CHECKING(for struct timeval in sys/time.h) -AC_EGREP_HEADER(tv_usec, sys/time.h, have_tv=yes, have_tv=no) -AC_MSG_RESULT($have_tv) -test $have_tv = yes && AC_DEFINE(HAVE_TIMEVAL) - -dnl Checks for library functions. -AC_FUNC_VPRINTF -AC_FUNC_WAIT3 -AC_CHECK_FUNCS(strerror) - -AC_MSG_CHECKING(for getpagesize) -AC_TRY_LINK([#include ], -[getpagesize();], have_gp=yes, have_gp=no) -AC_MSG_RESULT($have_gp) -test $have_gp = yes && AC_DEFINE(HAVE_GETPAGESIZE) - -AC_OUTPUT(Makefile) -- 2.7.4