/[emacs]/emacs/configure.in
ViewVC logotype

Diff of /emacs/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.351.2.6 by miles, Thu Sep 30 01:20:38 2004 UTC revision 1.351.2.7 by miles, Thu Oct 14 08:50:07 2004 UTC
# Line 1286  AC_LINK_IFELSE([main(){return 0;}], Line 1286  AC_LINK_IFELSE([main(){return 0;}],
1286  dnl checks for Unix variants  dnl checks for Unix variants
1287  AC_AIX  AC_AIX
1288    
 dnl check if exec-shield is present.  
 AC_CHECK_FILE(/proc/sys/kernel/exec-shield, emacs_cv_execshield=1,  
                                             emacs_cv_execshield=0)  
 if test "$emacs_cv_execshield" = 1; then  
   AC_PATH_PROG(SETARCH, setarch, no)  
   AC_SUBST(SETARCH)  
   if test "$SETARCH" != no && test "$machine" = "intel386"; then  
     AC_DEFINE(HAVE_EXECSHIELD, 1,  
     [Define to 1 if this OS has exec shield and we can handle it.])  
   else  
     case "`cat /proc/sys/kernel/exec-shield`" in  
       0) ;;  
       *)  
         AC_MSG_ERROR([Exec-shield is turned on.  
 Emacs can not dump itself if exec-shield is turned on.  
 See `etc/PROBLEMS' for further information.])  
     esac  
   fi  
 fi  
1289    
1290  #### Extract some information from the operating system and machine files.  #### Extract some information from the operating system and machine files.
1291    
# Line 1591  AH_TEMPLATE(POINTER_TYPE, Line 1572  AH_TEMPLATE(POINTER_TYPE,
1572              [Define as `void' if your compiler accepts `void *'; otherwise              [Define as `void' if your compiler accepts `void *'; otherwise
1573               define as `char'.])dnl               define as `char'.])dnl
1574    
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    
1621    
1622  dnl This could be used for targets which can have both byte sexes.  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.  dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally.
1624  dnl AC_C_BIGENDIAN  dnl AC_C_BIGENDIAN
# Line 2285  if test "${with_carbon}" != "no"; then Line 2313  if test "${with_carbon}" != "no"; then
2313    AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)    AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)
2314  fi  fi
2315    
2316    dnl Check for malloc/malloc.h on darwin
2317    AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.]))
2318    
2319  if test "${HAVE_CARBON}" = "yes"; then  if test "${HAVE_CARBON}" = "yes"; then
2320    AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.])    AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.])
2321    window_system=mac    window_system=mac
# Line 3058  echo "  Does Emacs use -lpng? Line 3089  echo "  Does Emacs use -lpng?
3089  echo "  Does Emacs use X toolkit scroll bars?                   ${USE_TOOLKIT_SCROLL_BARS}"  echo "  Does Emacs use X toolkit scroll bars?                   ${USE_TOOLKIT_SCROLL_BARS}"
3090  echo  echo
3091    
3092    if test "$emacs_cv_randomheap" = warn; then
3093      AC_MSG_WARN([
3094    **********************************************************************
3095    
3096    Heap start address is randomized and no workaround is known.
3097    Emacs will probably dump core when temacs is run in the build phase.
3098    Maybe exec-shield is turned on.  Read about exec-shield in `etc/PROBLEMS'
3099    for further information.
3100    
3101    **********************************************************************
3102    ])
3103    fi
3104    
3105  # Remove any trailing slashes in these variables.  # Remove any trailing slashes in these variables.
3106  [test "${prefix}" != NONE &&  [test "${prefix}" != NONE &&
3107    prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`    prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`

Legend:
Removed from v.1.351.2.6  
changed lines
  Added in v.1.351.2.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26