aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-07-30 18:37:34 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-07-30 18:37:34 -0400
commit1bbd73eb9f765d6ad5ed257f8520877bfd58edfe (patch)
treee6782fd050472668c364b7c488c9733b40acfe1f
parentRefactor source tree: separate out fix-gnustack (diff)
downloadelfix-1bbd73eb9f765d6ad5ed257f8520877bfd58edfe.tar.gz
elfix-1bbd73eb9f765d6ad5ed257f8520877bfd58edfe.tar.bz2
elfix-1bbd73eb9f765d6ad5ed257f8520877bfd58edfe.zip
configure.ac: cleanup after moving fix-gnustack
-rw-r--r--configure.ac66
1 files changed, 28 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac
index 179eed5..aec42a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-AC_PREREQ([2.68])
+AC_PREREQ([2.69])
AC_INIT([elfix], [0.9], [http://bugs.gentoo.org/])
AC_CONFIG_SRCDIR([src/paxctl-ng.c])
AC_CONFIG_HEADERS([config.h])
@@ -27,16 +27,6 @@ LT_PREREQ([2.4])
LT_INIT([dlopen])
AC_CONFIG_MACRO_DIR([m4])
-AC_ARG_ENABLE(
- [tests],
- AS_HELP_STRING(
- [--enable-tests],
- [perform tests]
- ),
- [test "x$enable_tests" = "xyes"]
-)
-AM_CONDITIONAL([TEST],[test "x$enable_tests" = "xyes"])
-
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
@@ -50,9 +40,6 @@ AC_CHECK_HEADERS(
[AC_MSG_ERROR(["Missing necessary header"])]
)
-# Checks for DECLs.
-AC_CHECK_DECL([ELF_C_RDWR_MMAP],[],[],[[#include <libelf.h>]])
-
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
@@ -65,14 +52,15 @@ AC_FUNC_FORK
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset strerror])
-# Note: this is always needed for fix-gnustack
-# and for paxctl-ng only with --enable-ptpax
-AC_CHECK_LIB(
- [elf],
- [elf_begin],
- [],
- [AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]
+AC_ARG_ENABLE(
+ [tests],
+ AS_HELP_STRING(
+ [--enable-tests],
+ [perform tests]
+ ),
+ [test "x$enable_tests" = "xyes"]
)
+AM_CONDITIONAL([TEST],[test "x$enable_tests" = "xyes"])
AC_ARG_ENABLE(
[ptpax],
@@ -85,29 +73,31 @@ AC_ARG_ENABLE(
AS_IF(
[test "x$enable_ptpax" != "xno"],
[
- AS_IF(
- [test "x$ac_cv_have_decl_ELF_C_RDWR_MMAP" = "xyes"],
- [
- AC_CHECK_DECLS(
- [PT_PAX_FLAGS, PF_PAGEEXEC, PF_MPROTECT, PF_RANDMMAP],
- [],
- [
- CFLAGS+=" -DNEED_PAX_DECLS"
- ],
- [[#include <gelf.h>]]
- )
- CFLAGS+=" -DPTPAX"
- ],
- [AC_MSG_ERROR(["Missing necessary DECL ELF_C_RDWR_MMAP in libelf"])]
+ AC_CHECK_LIB(
+ [elf],
+ [elf_begin],
+ [],
+ [AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]
+ )
+ AC_CHECK_DECL(
+ [ELF_C_RDWR_MMAP],
+ [],
+ [AC_MSG_ERROR(["Missing necessary DECL ELF_C_RDWR_MMAP in libelf.h"])],
+ [[#include <libelf.h>]]
)
+ AC_CHECK_DECLS(
+ [PT_PAX_FLAGS, PF_PAGEEXEC, PF_MPROTECT, PF_RANDMMAP],
+ [],
+ [CFLAGS+=" -DNEED_PAX_DECLS"],
+ [[#include <gelf.h>]]
+ )
+ CFLAGS+=" -DPTPAX"
],
[
CFLAGS+=" -UPTPAX -DNEED_PAX_DECLS"
]
)
-AM_CONDITIONAL([BUILD_ELF],[test "x$enable_ptpax" = "xyes" && test "x$ac_cv_have_decl_ELF_C_RDWR_MMAP" = "xyes"])
-
AC_ARG_ENABLE(
[xtpax],
AS_HELP_STRING(
@@ -137,7 +127,7 @@ AS_IF(
]
)
-if [test "x$enable_ptpax" = "xno" -a "x$enable_xtpax" = "xno" ]; then
+if [test "x$enable_ptpax" = "xno" -a "x$enable_xtpax" = "xno" ]; then
AC_MSG_ERROR(["You must enable either ptpax or xtpax"])
fi