summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-10-20 16:16:07 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-10-20 16:16:07 +0000
commitf17e308a43db0a5bcc847714a79f3334201d415f (patch)
tree128bebe1e2b9bae8dfebbfeefb1b2a88f3d4d8e5 /configure.in
parented87225ada2d73979dfc4c3e376b70224db3fe15 (diff)
* configure.in (HAVE_PERSONALITY_LINUX32): New test if PER_LINUX32
can be set. Remove SETARCH test. * configure: Rebuild
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in57
1 files changed, 12 insertions, 45 deletions
diff --git a/configure.in b/configure.in
index 519f826f27..48ea02a351 100644
--- a/configure.in
+++ b/configure.in
@@ -1450,6 +1450,18 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h)
+
+AC_MSG_CHECKING(if personality LINUX32 can be set)
+AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
+ emacs_cv_personality_linux32=yes,
+ emacs_cv_personality_linux32=no)
+AC_MSG_RESULT($emacs_cv_personality_linux32)
+
+if test $emacs_cv_personality_linux32 = yes; then
+ AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1,
+ [Define to 1 if personality LINUX32 can be set.])
+fi
+
dnl On Solaris 8 there's a compilation warning for term.h because
dnl it doesn't define `bool'.
AC_CHECK_HEADERS(term.h, , , -)
@@ -1572,51 +1584,6 @@ AH_TEMPLATE(POINTER_TYPE,
[Define as `void' if your compiler accepts `void *'; otherwise
define as `char'.])dnl
-dnl Test if heap start address is randomized (exec-shield does this).
-dnl The test program requires unistd.h and stdlib.h. They are present
-dnl on the systems that currently have exec-shield.
-AC_MSG_CHECKING(whether heap start address is randomized)
-if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x
-then
- AC_TRY_RUN([#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-int main (int argc, char *argv[])
-{
- unsigned long old_sbrk = 0;
- unsigned long this_sbrk = (unsigned long) sbrk(0);
- int nr = 1;
- if (argc != 1) {
- old_sbrk = strtoul (argv[1], 0, 0);
- nr = atoi (argv[2])+1;
- }
- if (argc == 1 || (old_sbrk == this_sbrk && nr < 3))
- {
- char buf1[32], buf2[32];
- sprintf (buf1, "%lu", this_sbrk);
- sprintf (buf2, "%d", nr);
- execl (argv[0], argv[0], buf1, buf2, 0);
- exit (-1);
- }
- exit (this_sbrk == old_sbrk);
-}], emacs_cv_randomheap=yes, emacs_cv_randomheap=no,
- emacs_cv_randomheap='assuming no')
-else
- emacs_cv_randomheap='assuming no'
-fi
-AC_MSG_RESULT($emacs_cv_randomheap)
-
-if test "$emacs_cv_randomheap" = yes; then
- AC_PATH_PROG(SETARCH, setarch, no)
- AC_SUBST(SETARCH)
- if test "$SETARCH" != no && test "$machine" = "intel386"; then
- AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1,
- [Define to 1 if this OS randomizes the start address of the heap.])
- else
- dnl We do the warning at the end of the configure run so it is seen.
- emacs_cv_randomheap=warn
- fi
-fi
dnl This could be used for targets which can have both byte sexes.