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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([elfix], [0.3.1], [http://bugs.gentoo.org/])
AC_CONFIG_SRCDIR([src/fix-gnustack.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11 foreign])
AC_ARG_ENABLE(
[tests],
AS_HELP_STRING(
[--enable-tests],
[perform tests]
),
[
AS_IF(
[test "x$enable_tests" = "xyes"],
[
AC_CHECK_PROG([has_yasm],[yasm],["yes"],["no"])
AS_IF([test "x$has_yasm" = "xno"],AC_MSG_ERROR(["Missing yasm assembler"]))
]
)
]
)
AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"])
# Checks for programs.
AC_PROG_CC
AC_CHECK_FUNCS([memset strerror])
AC_FUNC_MMAP
# Checks for libraries.
AC_CHECK_LIB([elf], [elf_begin])
AC_CHECK_LIB([attr], [fgetxattr])
# Checks for header files.
AC_CHECK_HEADERS([attr/xattr.h errno.h error.h fcntl.h gelf.h libgen.h stdio.h \
stdlib.h string.h sys/mman.h sys/stat.h sys/types.h unistd.h
],
[], [AC_MSG_ERROR(["Missing necessary header"])])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_CONFIG_FILES([
Makefile
src/Makefile
scripts/Makefile
doc/Makefile
tests/Makefile
tests/gnustack/Makefile
tests/pxtpax/Makefile
])
AC_OUTPUT
|