aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2004-10-20 16:16:07 +0000
committerJan Djärv2004-10-20 16:16:07 +0000
commitf17e308a43db0a5bcc847714a79f3334201d415f (patch)
tree128bebe1e2b9bae8dfebbfeefb1b2a88f3d4d8e5
parented87225ada2d73979dfc4c3e376b70224db3fe15 (diff)
downloademacs-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--ChangeLog6
-rwxr-xr-xconfigure178
-rw-r--r--configure.in57
3 files changed, 78 insertions, 163 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d2545f9056..f215921b6e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
12004-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
12004-10-08 Steven Tamm <steventamm@mac.com> 72004-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
diff --git a/configure b/configure
index 1f01796bb60..316babd4d3c 100755
--- a/configure
+++ b/configure
@@ -310,7 +310,7 @@ ac_includes_default="\
310# include <unistd.h> 310# include <unistd.h>
311#endif" 311#endif"
312 312
313ac_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' 313ac_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'
314ac_subst_files='' 314ac_subst_files=''
315 315
316# Initialize some variables set by options. 316# Initialize some variables set by options.
@@ -5440,6 +5440,65 @@ fi
5440done 5440done
5441 5441
5442 5442
5443echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
5444echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6
5445cat >conftest.$ac_ext <<_ACEOF
5446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
5451#include <sys/personality.h>
5452int
5453main ()
5454{
5455personality (PER_LINUX32)
5456 ;
5457 return 0;
5458}
5459_ACEOF
5460rm -f conftest.$ac_objext
5461if { (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
5483else
5484 echo "$as_me: failed program was:" >&5
5485sed 's/^/| /' conftest.$ac_ext >&5
5486
5487emacs_cv_personality_linux32=no
5488fi
5489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5490echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
5491echo "${ECHO_T}$emacs_cv_personality_linux32" >&6
5492
5493if test $emacs_cv_personality_linux32 = yes; then
5494
5495cat >>confdefs.h <<\_ACEOF
5496#define HAVE_PERSONALITY_LINUX32 1
5497_ACEOF
5498
5499fi
5500
5501
5443for ac_header in term.h 5502for ac_header in term.h
5444do 5503do
5445as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 5504as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -7741,122 +7800,6 @@ _ACEOF
7741fi 7800fi
7742 7801
7743 7802
7744echo "$as_me:$LINENO: checking whether heap start address is randomized" >&5
7745echo $ECHO_N "checking whether heap start address is randomized... $ECHO_C" >&6
7746if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x
7747then
7748 if test "$cross_compiling" = yes; then
7749 emacs_cv_randomheap='assuming no'
7750else
7751 cat >conftest.$ac_ext <<_ACEOF
7752/* confdefs.h. */
7753_ACEOF
7754cat confdefs.h >>conftest.$ac_ext
7755cat >>conftest.$ac_ext <<_ACEOF
7756/* end confdefs.h. */
7757#include <stdio.h>
7758#include <unistd.h>
7759#include <stdlib.h>
7760int 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
7780rm -f conftest$ac_exeext
7781if { (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
7792else
7793 echo "$as_me: program exited with status $ac_status" >&5
7794echo "$as_me: failed program was:" >&5
7795sed 's/^/| /' conftest.$ac_ext >&5
7796
7797( exit $ac_status )
7798emacs_cv_randomheap=no
7799fi
7800rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7801fi
7802else
7803 emacs_cv_randomheap='assuming no'
7804fi
7805echo "$as_me:$LINENO: result: $emacs_cv_randomheap" >&5
7806echo "${ECHO_T}$emacs_cv_randomheap" >&6
7807
7808if test "$emacs_cv_randomheap" = yes; then
7809 # Extract the first word of "setarch", so it can be a program name with args.
7810set dummy setarch; ac_word=$2
7811echo "$as_me:$LINENO: checking for $ac_word" >&5
7812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7813if test "${ac_cv_path_SETARCH+set}" = set; then
7814 echo $ECHO_N "(cached) $ECHO_C" >&6
7815else
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
7822for as_dir in $PATH
7823do
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
7832done
7833done
7834
7835 test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no"
7836 ;;
7837esac
7838fi
7839SETARCH=$ac_cv_path_SETARCH
7840
7841if test -n "$SETARCH"; then
7842 echo "$as_me:$LINENO: result: $SETARCH" >&5
7843echo "${ECHO_T}$SETARCH" >&6
7844else
7845 echo "$as_me:$LINENO: result: no" >&5
7846echo "${ECHO_T}no" >&6
7847fi
7848
7849
7850 if test "$SETARCH" != no && test "$machine" = "intel386"; then
7851
7852cat >>confdefs.h <<\_ACEOF
7853#define HAVE_RANDOM_HEAPSTART 1
7854_ACEOF
7855
7856 else
7857 emacs_cv_randomheap=warn
7858 fi
7859fi
7860 7803
7861 7804
7862 7805
@@ -22291,7 +22234,6 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22291s,@INSTALL_INFO@,$INSTALL_INFO,;t t 22234s,@INSTALL_INFO@,$INSTALL_INFO,;t t
22292s,@EGREP@,$EGREP,;t t 22235s,@EGREP@,$EGREP,;t t
22293s,@LIBSOUND@,$LIBSOUND,;t t 22236s,@LIBSOUND@,$LIBSOUND,;t t
22294s,@SETARCH@,$SETARCH,;t t
22295s,@SET_MAKE@,$SET_MAKE,;t t 22237s,@SET_MAKE@,$SET_MAKE,;t t
22296s,@PKG_CONFIG@,$PKG_CONFIG,;t t 22238s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22297s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t 22239s,@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
1454AC_MSG_CHECKING(if personality LINUX32 can be set)
1455AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
1456 emacs_cv_personality_linux32=yes,
1457 emacs_cv_personality_linux32=no)
1458AC_MSG_RESULT($emacs_cv_personality_linux32)
1459
1460if test $emacs_cv_personality_linux32 = yes; then
1461 AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1,
1462 [Define to 1 if personality LINUX32 can be set.])
1463fi
1464
1453dnl On Solaris 8 there's a compilation warning for term.h because 1465dnl On Solaris 8 there's a compilation warning for term.h because
1454dnl it doesn't define `bool'. 1466dnl it doesn't define `bool'.
1455AC_CHECK_HEADERS(term.h, , , -) 1467AC_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
1575dnl Test if heap start address is randomized (exec-shield does this).
1576dnl The test program requires unistd.h and stdlib.h. They are present
1577dnl on the systems that currently have exec-shield.
1578AC_MSG_CHECKING(whether heap start address is randomized)
1579if test x"$ac_cv_header_unistd_h" != x && test x"$ac_cv_header_stdlib_h" != x
1580then
1581 AC_TRY_RUN([#include <stdio.h>
1582#include <unistd.h>
1583#include <stdlib.h>
1584int 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')
1604else
1605 emacs_cv_randomheap='assuming no'
1606fi
1607AC_MSG_RESULT($emacs_cv_randomheap)
1608
1609if 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
1619fi
1620 1587
1621 1588
1622dnl This could be used for targets which can have both byte sexes. 1589dnl This could be used for targets which can have both byte sexes.