1 |
commit: e334b5df552dec27782a75ef3ef3c3994befb5fc |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 26 22:54:41 2011 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 26 22:54:41 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=e334b5df |
7 |
|
8 |
configure.ac: added --enable-xattr switch |
9 |
|
10 |
--- |
11 |
configure.ac | 53 +++++++++++++++++++++++++++++++++++++++++++++-------- |
12 |
1 files changed, 45 insertions(+), 8 deletions(-) |
13 |
|
14 |
diff --git a/configure.ac b/configure.ac |
15 |
index 18331f1..46ca874 100644 |
16 |
--- a/configure.ac |
17 |
+++ b/configure.ac |
18 |
@@ -25,29 +25,66 @@ AC_ARG_ENABLE( |
19 |
) |
20 |
AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"]) |
21 |
|
22 |
+AC_ARG_ENABLE( |
23 |
+ [xattr], |
24 |
+ AS_HELP_STRING( |
25 |
+ [--enable-xattr], |
26 |
+ [enable support for pax markings in xattrs] |
27 |
+ ), |
28 |
+ [ |
29 |
+ AS_IF( |
30 |
+ [test "x$enable_xattr" = "xyes"], |
31 |
+ [ |
32 |
+ AC_CHECK_HEADERS( |
33 |
+ [attr/xattr.h], |
34 |
+ [], |
35 |
+ [AC_MSG_ERROR(["Missing necessary attr/xattr.h"])] |
36 |
+ ) |
37 |
+ AC_CHECK_LIB( |
38 |
+ [attr], |
39 |
+ [fgetxattr], |
40 |
+ [], |
41 |
+ [AC_MSG_ERROR(["Missing necessary function fgetxattr in libattr"])] |
42 |
+ ) |
43 |
+ CFLAGS+=" -DXATTR" |
44 |
+ ], |
45 |
+ [ |
46 |
+ CFLAGS+=" -UXATTR" |
47 |
+ ] |
48 |
+ ) |
49 |
+ ], |
50 |
+ [ |
51 |
+ CFLAGS+=" -DXATTR" |
52 |
+ ] |
53 |
+) |
54 |
+ |
55 |
# Checks for programs. |
56 |
+AC_PROG_AWK |
57 |
AC_PROG_CC |
58 |
-AC_CHECK_FUNCS([memset strerror]) |
59 |
-AC_FUNC_MMAP |
60 |
|
61 |
# Checks for libraries. |
62 |
-AC_CHECK_LIB([elf], [elf_begin]) |
63 |
-AC_CHECK_LIB([attr], [fgetxattr]) |
64 |
+AC_CHECK_LIB([elf], [elf_begin],[],[AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]) |
65 |
|
66 |
# Checks for header files. |
67 |
|
68 |
-AC_CHECK_HEADERS([attr/xattr.h errno.h error.h fcntl.h gelf.h libgen.h stdio.h \ |
69 |
- stdlib.h string.h sys/mman.h sys/stat.h sys/types.h unistd.h |
70 |
-], |
71 |
-[], [AC_MSG_ERROR(["Missing necessary header"])]) |
72 |
+AC_CHECK_HEADERS( |
73 |
+ [errno.h error.h fcntl.h gelf.h libgen.h stdio.h stdlib.h string.h \ |
74 |
+ sys/mman.h sys/stat.h sys/types.h unistd.h], |
75 |
+ [], |
76 |
+ [AC_MSG_ERROR(["Missing necessary header"])] |
77 |
+) |
78 |
|
79 |
# Checks for typedefs, structures, and compiler characteristics. |
80 |
+AC_TYPE_PID_T |
81 |
AC_TYPE_SIZE_T |
82 |
AC_TYPE_UINT8_T |
83 |
AC_TYPE_UINT16_T |
84 |
|
85 |
# Checks for library functions. |
86 |
AC_FUNC_ERROR_AT_LINE |
87 |
+AC_FUNC_FORK |
88 |
+AC_FUNC_MMAP |
89 |
+AC_CHECK_FUNCS([memset strerror]) |
90 |
|
91 |
AC_CONFIG_FILES([ |
92 |
Makefile |