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, , , -)
[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.
dnl GTK scrollbars resemble toolkit scrollbars a lot, so to avoid
dnl a lot if #ifdef:s, say we have toolkit scrollbars.
- with_toolkit_scroll_bars=yes
+ if test "$with_toolkit_scroll_bars" != no; then
+ with_toolkit_scroll_bars=yes
+ fi
dnl Check if we can use multiple displays with this GTK version.
dnl If gdk_display_open exists, assume all others are there also.
AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1,
[Define to 1 if GTK can handle more than one display.])
fi
+ dnl Check if we have the old file selection dialog.
+ dnl If gdk_display_open exists, assume all others are there also.
+ HAVE_GTK_FILE_SELECTION=no
+ AC_CHECK_FUNCS(gtk_file_selection_new, HAVE_GTK_FILE_SELECTION=yes)
+
+ dnl Check if we have the new file chooser dialog
+ dnl If gdk_display_open exists, assume all others are there also.
+ HAVE_GTK_FILE_CHOOSER=no
+ AC_CHECK_FUNCS(gtk_file_chooser_dialog_new, HAVE_GTK_FILE_CHOOSER=yes)
+
+ if test "$HAVE_GTK_FILE_SELECTION" = yes \
+ && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
+ AC_DEFINE(HAVE_GTK_FILE_BOTH, 1,
+ [Define to 1 if GTK has both file selection and chooser dialog.])
+ fi
fi
dnl Do not put whitespace before the #include statements below.
AC_CHECK_HEADER(Carbon/Carbon.h, HAVE_CARBON=yes)
fi
+dnl Check for malloc/malloc.h on darwin
+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.]))
+
if test "${HAVE_CARBON}" = "yes"; then
AC_DEFINE(HAVE_CARBON, 1, [Define to 1 if you are using the Carbon API on Mac OS X.])
window_system=mac
AC_CHECK_HEADERS(maillock.h)
AC_CHECK_FUNCS(gethostname getdomainname dup2 \
-rename closedir mkdir rmdir sysinfo \
+rename closedir mkdir rmdir sysinfo getrusage \
random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \