summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2010-02-17 16:39:58 +0100
committerAndreas Gruenbacher <agruen@suse.de>2010-04-12 16:27:55 +0200
commit7fa8417c05f8d56b0c6b09412be7a52c30212c32 (patch)
treed945113753e3b2c8c3560cf0bd5466e18cb8345d /configure.ac
parent8d5ea52c7a41f56c296baab0fe23392d38263393 (diff)
downloadpatch-7fa8417c05f8d56b0c6b09412be7a52c30212c32.tar.gz
Convert to automake and use a git submodule for gnulib
* configure.ac: Add automake and gnulib macros, replace several obsolete macros. * Makefile.am, lib/Makefile.am, src/Makefile.am, tests/Makefile.am: Add for automake. * autogen.sh, INSTALL, Makefile.in, mkinstalldirs, update-version.sh: Obsolete; remove. * README-hacking: Import from diffutils, replace cvs with git. * build-aux: Move gnulib auxiliary files here from the top-level directory. * gnulib: Add gnulib git submodule. * bootstrap, bootstrap.conf: Import from gnulib and adjust. * gl/lib: Remove gnulib files from the repository; they are now imported into lib/ from gnulib as needed. * tests/test-lib.sh: Use $abs_top_builddir exported from tests/Makefile.am here instead of $PWD. * m4/utimbuf.m4: This macro has been removed from gnulib. Add it here for now; this will be replaced by gnulib's utimens module soon.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac97
1 files changed, 34 insertions, 63 deletions
diff --git a/configure.ac b/configure.ac
index 368f3bd..701b5af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,3 @@
-# Configure `patch'.
-
# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2006, 2009
# Free Software Foundation, Inc.
@@ -18,82 +16,55 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
-AC_PREREQ(2.57)
-define(AC_PACKAGE_VERSION, m4_normalize(esyscmd(
-[
- sh ./update-version.sh VERSION
- cat VERSION
-])))
-AC_INIT(patch, AC_PACKAGE_VERSION, bug-patch@gnu.org)
-AC_CONFIG_SRCDIR(src/patch.c)
-AC_CONFIG_HEADER(config.h:config.hin)
-AC_ARG_PROGRAM
+AC_PREREQ([2.59])
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
-AC_PATH_PROG(EDITOR_PROGRAM, ed, ed)
+AC_INIT([GNU patch],
+ m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+ [bug-patch@gnu.org])
-AC_PATH_PROG(TEST_SHELL, [bash sh])
+AC_CONFIG_SRCDIR([src/patch.c])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
-gl_USE_SYSTEM_EXTENSIONS
+AC_ARG_ENABLE([merge],
+ [AS_HELP_STRING([--disable-merge],
+ [disable support for merging])])
+AM_CONDITIONAL([ENABLE_MERGE], [test "$enableval" != no])
+AM_CONDITIONAL([ALPHA_VERSION],
+ [[echo "$PACKAGE_VERSION" | grep -q -- "-[0-9a-f][0-9a-f]*\\(-dirty\\)\\?$"]])
+
+AM_INIT_AUTOMAKE([-Wall -Werror gnu dist-bzip2 dist-xz color-tests parallel-tests])
+AM_SILENT_RULES([yes])
+
+AC_CONFIG_HEADER([config.h:config.hin])
+
+AC_PROG_CC
AC_PROG_CC_STDC
+gl_EARLY
+gl_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
-AC_EXEEXT
-
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h utime.h)
+gl_INIT
AC_TYPE_MODE_T
AC_TYPE_OFF_T
-AM_STDBOOL_H
+# FIXME: The utime module is obsolete; replace with utimens.
gl_CHECK_TYPE_STRUCT_UTIMBUF
-gl_ARGMATCH
-gl_BACKUPFILE
-gl_DIRNAME
-gl_ERROR
-gl_EXITFAIL
-gl_FUNC_MEMCHR
-gl_FUNC_STRNDUP
-gl_FUNC_STRNLEN
-gl_GETOPT
-gl_HASH
-gl_PREREQ_XMALLOC
-gl_QUOTE
-gl_QUOTEARG
-gl_SAFE_WRITE
-gl_STRCASE
-gl_XALLOC
-gl_XSTRNDUP
-
-dnl lib/basename.c requires xstrndup.
-AC_LIBOBJ([xstrndup])
-
-dnl m4/error.m4 does not do this:
-AC_LIBOBJ([error])
-
+AC_CHECK_HEADERS([fcntl.h utime.h])
AC_CHECK_DECLS([mktemp])
AC_CHECK_FUNCS(geteuid getuid mktemp raise sigaction sigprocmask sigsetmask)
-AC_FUNC_FSEEKO
-gl_FUNC_GLIBC_UNLOCKED_IO
-gl_FUNC_MALLOC_POSIX
-gl_FUNC_REALLOC_POSIX
-AC_FUNC_CLOSEDIR_VOID
AC_FUNC_SETMODE_DOS
-AC_FUNC_VPRINTF
PATCH_FUNC_MKDIR_TAKES_ONE_ARG
-gl_AC_DOS
-AC_SYS_LONG_FILE_NAMES
-
-AC_ARG_ENABLE([merge],
- [AS_HELP_STRING([--disable-merge],
- [disable support for merging])])
-if test "$enableval" != no ; then
- AC_SUBST(ENABLE_MERGE, 1)
-fi
+AC_PATH_PROG([ED], [ed], [ed])
+AC_DEFINE_UNQUOTED([EDITOR_PROGRAM], ["$ED"], [Name of editor program.])
+AC_PATH_PROG(TEST_SHELL, [bash sh])
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([
+ Makefile
+ lib/Makefile
+ src/Makefile
+ tests/Makefile
+])
AC_OUTPUT