Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/elfix:master commit in: /
Date: Wed, 30 Jul 2014 22:36:15
Message-Id: 1406759854.1bbd73eb9f765d6ad5ed257f8520877bfd58edfe.blueness@gentoo
1 commit: 1bbd73eb9f765d6ad5ed257f8520877bfd58edfe
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 30 22:37:34 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 30 22:37:34 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=1bbd73eb
7
8 configure.ac: cleanup after moving fix-gnustack
9
10 ---
11 configure.ac | 66 ++++++++++++++++++++++++++----------------------------------
12 1 file changed, 28 insertions(+), 38 deletions(-)
13
14 diff --git a/configure.ac b/configure.ac
15 index 179eed5..aec42a4 100644
16 --- a/configure.ac
17 +++ b/configure.ac
18 @@ -16,7 +16,7 @@
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #
21
22 -AC_PREREQ([2.68])
23 +AC_PREREQ([2.69])
24 AC_INIT([elfix], [0.9], [http://bugs.gentoo.org/])
25 AC_CONFIG_SRCDIR([src/paxctl-ng.c])
26 AC_CONFIG_HEADERS([config.h])
27 @@ -27,16 +27,6 @@ LT_PREREQ([2.4])
28 LT_INIT([dlopen])
29 AC_CONFIG_MACRO_DIR([m4])
30
31 -AC_ARG_ENABLE(
32 - [tests],
33 - AS_HELP_STRING(
34 - [--enable-tests],
35 - [perform tests]
36 - ),
37 - [test "x$enable_tests" = "xyes"]
38 -)
39 -AM_CONDITIONAL([TEST],[test "x$enable_tests" = "xyes"])
40 -
41 # Checks for programs.
42 AC_PROG_AWK
43 AC_PROG_CC
44 @@ -50,9 +40,6 @@ AC_CHECK_HEADERS(
45 [AC_MSG_ERROR(["Missing necessary header"])]
46 )
47
48 -# Checks for DECLs.
49 -AC_CHECK_DECL([ELF_C_RDWR_MMAP],[],[],[[#include <libelf.h>]])
50 -
51 # Checks for typedefs, structures, and compiler characteristics.
52 AC_TYPE_PID_T
53 AC_TYPE_SIZE_T
54 @@ -65,14 +52,15 @@ AC_FUNC_FORK
55 AC_FUNC_MMAP
56 AC_CHECK_FUNCS([memset strerror])
57
58 -# Note: this is always needed for fix-gnustack
59 -# and for paxctl-ng only with --enable-ptpax
60 -AC_CHECK_LIB(
61 - [elf],
62 - [elf_begin],
63 - [],
64 - [AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]
65 +AC_ARG_ENABLE(
66 + [tests],
67 + AS_HELP_STRING(
68 + [--enable-tests],
69 + [perform tests]
70 + ),
71 + [test "x$enable_tests" = "xyes"]
72 )
73 +AM_CONDITIONAL([TEST],[test "x$enable_tests" = "xyes"])
74
75 AC_ARG_ENABLE(
76 [ptpax],
77 @@ -85,29 +73,31 @@ AC_ARG_ENABLE(
78 AS_IF(
79 [test "x$enable_ptpax" != "xno"],
80 [
81 - AS_IF(
82 - [test "x$ac_cv_have_decl_ELF_C_RDWR_MMAP" = "xyes"],
83 - [
84 - AC_CHECK_DECLS(
85 - [PT_PAX_FLAGS, PF_PAGEEXEC, PF_MPROTECT, PF_RANDMMAP],
86 - [],
87 - [
88 - CFLAGS+=" -DNEED_PAX_DECLS"
89 - ],
90 - [[#include <gelf.h>]]
91 - )
92 - CFLAGS+=" -DPTPAX"
93 - ],
94 - [AC_MSG_ERROR(["Missing necessary DECL ELF_C_RDWR_MMAP in libelf"])]
95 + AC_CHECK_LIB(
96 + [elf],
97 + [elf_begin],
98 + [],
99 + [AC_MSG_ERROR(["Missing necessary function elf_begin in libelf"])]
100 + )
101 + AC_CHECK_DECL(
102 + [ELF_C_RDWR_MMAP],
103 + [],
104 + [AC_MSG_ERROR(["Missing necessary DECL ELF_C_RDWR_MMAP in libelf.h"])],
105 + [[#include <libelf.h>]]
106 )
107 + AC_CHECK_DECLS(
108 + [PT_PAX_FLAGS, PF_PAGEEXEC, PF_MPROTECT, PF_RANDMMAP],
109 + [],
110 + [CFLAGS+=" -DNEED_PAX_DECLS"],
111 + [[#include <gelf.h>]]
112 + )
113 + CFLAGS+=" -DPTPAX"
114 ],
115 [
116 CFLAGS+=" -UPTPAX -DNEED_PAX_DECLS"
117 ]
118 )
119
120 -AM_CONDITIONAL([BUILD_ELF],[test "x$enable_ptpax" = "xyes" && test "x$ac_cv_have_decl_ELF_C_RDWR_MMAP" = "xyes"])
121 -
122 AC_ARG_ENABLE(
123 [xtpax],
124 AS_HELP_STRING(
125 @@ -137,7 +127,7 @@ AS_IF(
126 ]
127 )
128
129 -if [test "x$enable_ptpax" = "xno" -a "x$enable_xtpax" = "xno" ]; then
130 +if [test "x$enable_ptpax" = "xno" -a "x$enable_xtpax" = "xno" ]; then
131 AC_MSG_ERROR(["You must enable either ptpax or xtpax"])
132 fi