summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 82e0a5272ef8c478c8cb4747fe043c83a13dfb2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2006, 2009
# Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.

AC_PREREQ([2.65])

AC_INIT([GNU patch],
	m4_esyscmd([build-aux/git-version-gen .tarball-version]),
	[bug-patch@gnu.org])

AC_CONFIG_SRCDIR([src/patch.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])

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 -- "-[0-9a-f][0-9a-f]*\\(-dirty\\)\\?$" >/dev/null]])

AM_INIT_AUTOMAKE([1.11.1 -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_HEADER_STDC
gl_INIT

AC_TYPE_MODE_T
AC_TYPE_OFF_T

gl_FUNC_XATTR

AC_CHECK_FUNCS(geteuid getuid raise sigaction sigprocmask sigsetmask)
AC_FUNC_SETMODE_DOS

AC_PATH_PROG([ED], [ed], [ed])
AC_DEFINE_UNQUOTED([EDITOR_PROGRAM], ["$ED"], [Name of editor program.])

AC_CONFIG_FILES([
  Makefile
  lib/Makefile
  src/Makefile
  tests/Makefile
])
AC_OUTPUT