diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2011-11-26 17:54:41 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2011-11-26 17:54:41 -0500 |
commit | e334b5df552dec27782a75ef3ef3c3994befb5fc (patch) | |
tree | b30353c189d235e16042cb638d675b60b82b3daf /configure.ac | |
parent | scripts/revdep-pax: fix parameter order for run_soname (diff) | |
download | elfix-e334b5df552dec27782a75ef3ef3c3994befb5fc.tar.gz elfix-e334b5df552dec27782a75ef3ef3c3994befb5fc.tar.bz2 elfix-e334b5df552dec27782a75ef3ef3c3994befb5fc.zip |
configure.ac: added --enable-xattr switch
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 53 |
1 files changed, 45 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 18331f1..46ca874 100644 --- a/configure.ac +++ b/configure.ac @@ -25,29 +25,66 @@ AC_ARG_ENABLE( ) AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"]) +AC_ARG_ENABLE( + [xattr], + AS_HELP_STRING( + [--enable-xattr], + [enable support for pax markings in xattrs] + ), + [ + AS_IF( + [test "x$enable_xattr" = "xyes"], + [ + AC_CHECK_HEADERS( + [attr/xattr.h], + [], + [AC_MSG_ERROR(["Missing necessary attr/xattr.h"])] + ) + AC_CHECK_LIB( + [attr], + [fgetxattr], + [], + [AC_MSG_ERROR(["Missing necessary function fgetxattr in libattr"])] + ) + CFLAGS+=" -DXATTR" + ], + [ + CFLAGS+=" -UXATTR" + ] + ) + ], + [ + CFLAGS+=" -DXATTR" + ] +) + # Checks for programs. +AC_PROG_AWK 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]) +AC_CHECK_LIB([elf], [elf_begin],[],[AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]) # 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"])]) +AC_CHECK_HEADERS( + [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_PID_T AC_TYPE_SIZE_T AC_TYPE_UINT8_T AC_TYPE_UINT16_T # Checks for library functions. AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_MMAP +AC_CHECK_FUNCS([memset strerror]) AC_CONFIG_FILES([ Makefile |