Mercurial > emacs
comparison configure.in @ 57622:a17f324d7b7f
* configure.in (HAVE_PERSONALITY_LINUX32): New test if PER_LINUX32
can be set. Remove SETARCH test.
* configure: Rebuild
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Wed, 20 Oct 2004 16:16:07 +0000 |
parents | f95883a41a23 |
children | eee018b36c35 f3ec05478165 |
comparison
equal
deleted
inserted
replaced
57621:705620eb98c4 | 57622:a17f324d7b7f |
---|---|
1448 dnl checks for header files | 1448 dnl checks for header files |
1449 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ | 1449 AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \ |
1450 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ | 1450 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \ |
1451 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ | 1451 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \ |
1452 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h) | 1452 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h) |
1453 | |
1454 AC_MSG_CHECKING(if personality LINUX32 can be set) | |
1455 AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)], | |
1456 emacs_cv_personality_linux32=yes, | |
1457 emacs_cv_personality_linux32=no) | |
1458 AC_MSG_RESULT($emacs_cv_personality_linux32) | |
1459 | |
1460 if test $emacs_cv_personality_linux32 = yes; then | |
1461 AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1, | |
1462 [Define to 1 if personality LINUX32 can be set.]) | |
1463 fi | |
1464 | |
1453 dnl On Solaris 8 there's a compilation warning for term.h because | 1465 dnl On Solaris 8 there's a compilation warning for term.h because |
1454 dnl it doesn't define `bool'. | 1466 dnl it doesn't define `bool'. |
1455 AC_CHECK_HEADERS(term.h, , , -) | 1467 AC_CHECK_HEADERS(term.h, , , -) |
1456 AC_HEADER_STDC | 1468 AC_HEADER_STDC |
1457 AC_HEADER_TIME | 1469 AC_HEADER_TIME |
1570 fi | 1582 fi |
1571 AH_TEMPLATE(POINTER_TYPE, | 1583 AH_TEMPLATE(POINTER_TYPE, |
1572 [Define as `void' if your compiler accepts `void *'; otherwise | 1584 [Define as `void' if your compiler accepts `void *'; otherwise |
1573 define as `char'.])dnl | 1585 define as `char'.])dnl |
1574 | 1586 |
1575 dnl Test if heap start address is randomized (exec-shield does this). | |
1576 dnl The test program requires unistd.h and stdlib.h. They are present | |
1577 dnl on the systems that currently have exec-shield. | |
1578 AC_MSG_CHECKING(whether heap start address is randomized) | |
1579 if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x | |
1580 then | |
1581 AC_TRY_RUN([#include <stdio.h> | |
1582 #include <unistd.h> | |
1583 #include <stdlib.h> | |
1584 int main (int argc, char *argv[]) | |
1585 { | |
1586 unsigned long old_sbrk = 0; | |
1587 unsigned long this_sbrk = (unsigned long) sbrk(0); | |
1588 int nr = 1; | |
1589 if (argc != 1) { | |
1590 old_sbrk = strtoul (argv[1], 0, 0); | |
1591 nr = atoi (argv[2])+1; | |
1592 } | |
1593 if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) | |
1594 { | |
1595 char buf1[32], buf2[32]; | |
1596 sprintf (buf1, "%lu", this_sbrk); | |
1597 sprintf (buf2, "%d", nr); | |
1598 execl (argv[0], argv[0], buf1, buf2, 0); | |
1599 exit (-1); | |
1600 } | |
1601 exit (this_sbrk == old_sbrk); | |
1602 }], emacs_cv_randomheap=yes, emacs_cv_randomheap=no, | |
1603 emacs_cv_randomheap='assuming no') | |
1604 else | |
1605 emacs_cv_randomheap='assuming no' | |
1606 fi | |
1607 AC_MSG_RESULT($emacs_cv_randomheap) | |
1608 | |
1609 if test "$emacs_cv_randomheap" = yes; then | |
1610 AC_PATH_PROG(SETARCH, setarch, no) | |
1611 AC_SUBST(SETARCH) | |
1612 if test "$SETARCH" != no && test "$machine" = "intel386"; then | |
1613 AC_DEFINE(HAVE_RANDOM_HEAPSTART, 1, | |
1614 [Define to 1 if this OS randomizes the start address of the heap.]) | |
1615 else | |
1616 dnl We do the warning at the end of the configure run so it is seen. | |
1617 emacs_cv_randomheap=warn | |
1618 fi | |
1619 fi | |
1620 | 1587 |
1621 | 1588 |
1622 dnl This could be used for targets which can have both byte sexes. | 1589 dnl This could be used for targets which can have both byte sexes. |
1623 dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. | 1590 dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. |
1624 dnl AC_C_BIGENDIAN | 1591 dnl AC_C_BIGENDIAN |