diff options
| author | Jan Djärv | 2004-10-20 16:16:07 +0000 |
|---|---|---|
| committer | Jan Djärv | 2004-10-20 16:16:07 +0000 |
| commit | f17e308a43db0a5bcc847714a79f3334201d415f (patch) | |
| tree | 128bebe1e2b9bae8dfebbfeefb1b2a88f3d4d8e5 | |
| parent | ed87225ada2d73979dfc4c3e376b70224db3fe15 (diff) | |
| download | emacs-f17e308a43db0a5bcc847714a79f3334201d415f.tar.gz emacs-f17e308a43db0a5bcc847714a79f3334201d415f.zip | |
* configure.in (HAVE_PERSONALITY_LINUX32): New test if PER_LINUX32
can be set. Remove SETARCH test.
* configure: Rebuild
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rwxr-xr-x | configure | 178 | ||||
| -rw-r--r-- | configure.in | 57 |
3 files changed, 78 insertions, 163 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2004-10-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * configure.in (HAVE_PERSONALITY_LINUX32): New test if PER_LINUX32 | ||
| 4 | can be set. Remove SETARCH test. | ||
| 5 | * configure: Rebuild | ||
| 6 | |||
| 1 | 2004-10-08 Steven Tamm <steventamm@mac.com> | 7 | 2004-10-08 Steven Tamm <steventamm@mac.com> |
| 2 | 8 | ||
| 3 | * configure.in (HAVE_MALLOC_MALLOC_H): Test for malloc/malloc.h | 9 | * configure.in (HAVE_MALLOC_MALLOC_H): Test for malloc/malloc.h |
| @@ -310,7 +310,7 @@ ac_includes_default="\ | |||
| 310 | # include <unistd.h> | 310 | # include <unistd.h> |
| 311 | #endif" | 311 | #endif" |
| 312 | 312 | ||
| 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SETARCH SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' | 313 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' |
| 314 | ac_subst_files='' | 314 | ac_subst_files='' |
| 315 | 315 | ||
| 316 | # Initialize some variables set by options. | 316 | # Initialize some variables set by options. |
| @@ -5440,6 +5440,65 @@ fi | |||
| 5440 | done | 5440 | done |
| 5441 | 5441 | ||
| 5442 | 5442 | ||
| 5443 | echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5 | ||
| 5444 | echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6 | ||
| 5445 | cat >conftest.$ac_ext <<_ACEOF | ||
| 5446 | /* confdefs.h. */ | ||
| 5447 | _ACEOF | ||
| 5448 | cat confdefs.h >>conftest.$ac_ext | ||
| 5449 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 5450 | /* end confdefs.h. */ | ||
| 5451 | #include <sys/personality.h> | ||
| 5452 | int | ||
| 5453 | main () | ||
| 5454 | { | ||
| 5455 | personality (PER_LINUX32) | ||
| 5456 | ; | ||
| 5457 | return 0; | ||
| 5458 | } | ||
| 5459 | _ACEOF | ||
| 5460 | rm -f conftest.$ac_objext | ||
| 5461 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
| 5462 | (eval $ac_compile) 2>conftest.er1 | ||
| 5463 | ac_status=$? | ||
| 5464 | grep -v '^ *+' conftest.er1 >conftest.err | ||
| 5465 | rm -f conftest.er1 | ||
| 5466 | cat conftest.err >&5 | ||
| 5467 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 5468 | (exit $ac_status); } && | ||
| 5469 | { ac_try='test -z "$ac_c_werror_flag" | ||
| 5470 | || test ! -s conftest.err' | ||
| 5471 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 5472 | (eval $ac_try) 2>&5 | ||
| 5473 | ac_status=$? | ||
| 5474 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 5475 | (exit $ac_status); }; } && | ||
| 5476 | { ac_try='test -s conftest.$ac_objext' | ||
| 5477 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 5478 | (eval $ac_try) 2>&5 | ||
| 5479 | ac_status=$? | ||
| 5480 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 5481 | (exit $ac_status); }; }; then | ||
| 5482 | emacs_cv_personality_linux32=yes | ||
| 5483 | else | ||
| 5484 | echo "$as_me: failed program was:" >&5 | ||
| 5485 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 5486 | |||
| 5487 | emacs_cv_personality_linux32=no | ||
| 5488 | fi | ||
| 5489 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
| 5490 | echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5 | ||
| 5491 | echo "${ECHO_T}$emacs_cv_personality_linux32" >&6 | ||
| 5492 | |||
| 5493 | if test $emacs_cv_personality_linux32 = yes; then | ||
| 5494 | |||
| 5495 | cat >>confdefs.h <<\_ACEOF | ||
| 5496 | #define HAVE_PERSONALITY_LINUX32 1 | ||
| 5497 | _ACEOF | ||
| 5498 | |||
| 5499 | fi | ||
| 5500 | |||
| 5501 | |||
| 5443 | for ac_header in term.h | 5502 | for ac_header in term.h |
| 5444 | do | 5503 | do |
| 5445 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | 5504 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| @@ -7741,122 +7800,6 @@ _ACEOF | |||
| 7741 | fi | 7800 | fi |
| 7742 | 7801 | ||
| 7743 | 7802 | ||
| 7744 | echo "$as_me:$LINENO: checking whether heap start address is randomized" >&5 | ||
| 7745 | echo $ECHO_N "checking whether heap start address is randomized... $ECHO_C" >&6 | ||
| 7746 | if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x | ||
| 7747 | then | ||
| 7748 | if test "$cross_compiling" = yes; then | ||
| 7749 | emacs_cv_randomheap='assuming no' | ||
| 7750 | else | ||
| 7751 | cat >conftest.$ac_ext <<_ACEOF | ||
| 7752 | /* confdefs.h. */ | ||
| 7753 | _ACEOF | ||
| 7754 | cat confdefs.h >>conftest.$ac_ext | ||
| 7755 | cat >>conftest.$ac_ext <<_ACEOF | ||
| 7756 | /* end confdefs.h. */ | ||
| 7757 | #include <stdio.h> | ||
| 7758 | #include <unistd.h> | ||
| 7759 | #include <stdlib.h> | ||
| 7760 | int main (int argc, char *argv[]) | ||
| 7761 | { | ||
| 7762 | unsigned long old_sbrk = 0; | ||
| 7763 | unsigned long this_sbrk = (unsigned long) sbrk(0); | ||
| 7764 | int nr = 1; | ||
| 7765 | if (argc != 1) { | ||
| 7766 | old_sbrk = strtoul (argv[1], 0, 0); | ||
| 7767 | nr = atoi (argv[2])+1; | ||
| 7768 | } | ||
| 7769 | if (argc == 1 || (old_sbrk == this_sbrk && nr < 3)) | ||
| 7770 | { | ||
| 7771 | char buf1[32], buf2[32]; | ||
| 7772 | sprintf (buf1, "%lu", this_sbrk); | ||
| 7773 | sprintf (buf2, "%d", nr); | ||
| 7774 | execl (argv[0], argv[0], buf1, buf2, 0); | ||
| 7775 | exit (-1); | ||
| 7776 | } | ||
| 7777 | exit (this_sbrk == old_sbrk); | ||
| 7778 | } | ||
| 7779 | _ACEOF | ||
| 7780 | rm -f conftest$ac_exeext | ||
| 7781 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
| 7782 | (eval $ac_link) 2>&5 | ||
| 7783 | ac_status=$? | ||
| 7784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 7785 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | ||
| 7786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
| 7787 | (eval $ac_try) 2>&5 | ||
| 7788 | ac_status=$? | ||
| 7789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
| 7790 | (exit $ac_status); }; }; then | ||
| 7791 | emacs_cv_randomheap=yes | ||
| 7792 | else | ||
| 7793 | echo "$as_me: program exited with status $ac_status" >&5 | ||
| 7794 | echo "$as_me: failed program was:" >&5 | ||
| 7795 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
| 7796 | |||
| 7797 | ( exit $ac_status ) | ||
| 7798 | emacs_cv_randomheap=no | ||
| 7799 | fi | ||
| 7800 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | ||
| 7801 | fi | ||
| 7802 | else | ||
| 7803 | emacs_cv_randomheap='assuming no' | ||
| 7804 | fi | ||
| 7805 | echo "$as_me:$LINENO: result: $emacs_cv_randomheap" >&5 | ||
| 7806 | echo "${ECHO_T}$emacs_cv_randomheap" >&6 | ||
| 7807 | |||
| 7808 | if test "$emacs_cv_randomheap" = yes; then | ||
| 7809 | # Extract the first word of "setarch", so it can be a program name with args. | ||
| 7810 | set dummy setarch; ac_word=$2 | ||
| 7811 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
| 7812 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
| 7813 | if test "${ac_cv_path_SETARCH+set}" = set; then | ||
| 7814 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
| 7815 | else | ||
| 7816 | case $SETARCH in | ||
| 7817 | [\\/]* | ?:[\\/]*) | ||
| 7818 | ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. | ||
| 7819 | ;; | ||
| 7820 | *) | ||
| 7821 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
| 7822 | for as_dir in $PATH | ||
| 7823 | do | ||
| 7824 | IFS=$as_save_IFS | ||
| 7825 | test -z "$as_dir" && as_dir=. | ||
| 7826 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
| 7827 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
| 7828 | ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" | ||
| 7829 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
| 7830 | break 2 | ||
| 7831 | fi | ||
| 7832 | done | ||
| 7833 | done | ||
| 7834 | |||
| 7835 | test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" | ||
| 7836 | ;; | ||
| 7837 | esac | ||
| 7838 | fi | ||
| 7839 | SETARCH=$ac_cv_path_SETARCH | ||
| 7840 | |||
| 7841 | if test -n "$SETARCH"; then | ||
| 7842 | echo "$as_me:$LINENO: result: $SETARCH" >&5 | ||
| 7843 | echo "${ECHO_T}$SETARCH" >&6 | ||
| 7844 | else | ||
| 7845 | echo "$as_me:$LINENO: result: no" >&5 | ||
| 7846 | echo "${ECHO_T}no" >&6 | ||
| 7847 | fi | ||
| 7848 | |||
| 7849 | |||
| 7850 | if test "$SETARCH" != no && test "$machine" = "intel386"; then | ||
| 7851 | |||
| 7852 | cat >>confdefs.h <<\_ACEOF | ||
| 7853 | #define HAVE_RANDOM_HEAPSTART 1 | ||
| 7854 | _ACEOF | ||
| 7855 | |||
| 7856 | else | ||
| 7857 | emacs_cv_randomheap=warn | ||
| 7858 | fi | ||
| 7859 | fi | ||
| 7860 | 7803 | ||
| 7861 | 7804 | ||
| 7862 | 7805 | ||
| @@ -22291,7 +22234,6 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |||
| 22291 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t | 22234 | s,@INSTALL_INFO@,$INSTALL_INFO,;t t |
| 22292 | s,@EGREP@,$EGREP,;t t | 22235 | s,@EGREP@,$EGREP,;t t |
| 22293 | s,@LIBSOUND@,$LIBSOUND,;t t | 22236 | s,@LIBSOUND@,$LIBSOUND,;t t |
| 22294 | s,@SETARCH@,$SETARCH,;t t | ||
| 22295 | s,@SET_MAKE@,$SET_MAKE,;t t | 22237 | s,@SET_MAKE@,$SET_MAKE,;t t |
| 22296 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t | 22238 | s,@PKG_CONFIG@,$PKG_CONFIG,;t t |
| 22297 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t | 22239 | s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t |
diff --git a/configure.in b/configure.in index 519f826f270..48ea02a351f 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 \ | |||
| 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, , , -) |
| @@ -1572,51 +1584,6 @@ 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. |