dnl autoconf
dnl in the directory containing this script.
dnl
-dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003
+dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004
dnl Free Software Foundation, Inc.
dnl
dnl This file is part of GNU Emacs.
use GNU make. If you do not have GNU make, then you must
now do `make distclean' in ${srcdir},
and then run $0 again.]])
-
-[extrasub='/^VPATH[ ]*=/c\
-vpath %.c $(srcdir)\
-vpath %.h $(srcdir)\
-vpath %.y $(srcdir)\
-vpath %.l $(srcdir)\
-vpath %.s $(srcdir)\
-vpath %.in $(srcdir)\
-vpath %.texi $(srcdir)']
fi
#### Given the configuration name, set machfile and opsysfile to the
dnl if not built to support GNU ld.
late_LDFLAGS=$LDFLAGS
-if test $GCC = yes; then
+if test "$GCC" = yes; then
LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
else
LDFLAGS="$LDFLAGS -znocombreloc"
dnl checks for Unix variants
AC_AIX
+
#### Extract some information from the operating system and machine files.
AC_CHECKING([the machine- and system-dependent files to find out
AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
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)
+ sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
+ sys/utsname.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 This could be used for targets which can have both byte sexes.
dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally.
dnl AC_C_BIGENDIAN
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
+
+ dnl Check if pthreads are available. Emacs only needs this when using
+ dnl gtk_file_chooser under Gnome.
+ if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
+ HAVE_GTK_AND_PTHREAD=no
+ AC_CHECK_HEADERS(pthread.h)
+ if test "$ac_cv_header_pthread_h"; then
+ AC_CHECK_LIB(pthread, pthread_self, HAVE_GTK_AND_PTHREAD=yes)
+ fi
+ if test "$HAVE_GTK_AND_PTHREAD" = yes; then
+ GTK_LIBS="$GTK_LIBS -lpthread"
+ AC_DEFINE(HAVE_GTK_AND_PTHREAD, 1,
+ [Define to 1 if you have GTK and pthread (-lpthread).])
+ fi
+ 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 \
__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
sendto recvfrom getsockopt setsockopt getsockname getpeername \
gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
-memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign)
+memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign)
AC_CHECK_HEADERS(sys/un.h)
fi
AH_TOP([/* GNU Emacs site configuration template file.
- Copyright (C) 1988, 93, 94, 99, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Don't try to switch on inline handling as detected by AC_C_INLINE
generally, because even if non-gcc compilers accept `inline', they
may reject `extern inline'. */
-#ifdef __GNUC__
+#if defined (__GNUC__) && defined (OPTIMIZE)
#define INLINE __inline__
#else
#define INLINE
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object
#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
-#define RE_TRANSLATE_P(TBL) (XFASTINT (TBL) != 0)
+#ifdef make_number
+/* If make_number is a macro, use it. */
+#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
+#else
+/* If make_number is a function, avoid it. */
+#define RE_TRANSLATE_P(TBL) (!(INTEGERP (TBL) && XINT (TBL) == 0))
+#endif
#endif
/* Avoid link-time collision with system mktime if we will use our own. */
echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo
+if test "$emacs_cv_randomheap" = warn; then
+ AC_MSG_WARN([
+**********************************************************************
+
+Heap start address is randomized and no workaround is known.
+Emacs will probably dump core when temacs is run in the build phase.
+Maybe exec-shield is turned on. Read about exec-shield in `etc/PROBLEMS'
+for further information.
+
+**********************************************************************
+])
+fi
+
# Remove any trailing slashes in these variables.
[test "${prefix}" != NONE &&
prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`