[Define this to check for errors in cons list.])
fi
+AC_ARG_ENABLE(use-lisp-union-type,
+[AS_HELP_STRING([--enable-use-lisp-union-type],
+ [use a union for the Lisp_Object data type.
+ This is only useful for development for catching certain types of bugs.])],
+if test "${enableval}" != "no"; then
+ AC_DEFINE(USE_LISP_UNION_TYPE, 1,
+ [Define this to use a lisp union for the Lisp_Object data type.])
+fi)
+
+
AC_ARG_ENABLE(profiling,
[AS_HELP_STRING([--enable-profiling],
[build emacs with profiling support.
C_OPTIMIZE_SWITCH=-O2
test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
else
- dnl FIXME? unused.
C_OPTIMIZE_SWITCH=-O
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
unset has_option
unset SAVE_CFLAGS
+### Use -Wold-style-definition if the compiler supports it
+# This can be removed when conversion to standard C is finished.
+AC_MSG_CHECKING([whether gcc understands -Wold-style-definition])
+SAVE_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wold-style-definition"
+AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+if test $has_option = yes; then
+ C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
+fi
+AC_MSG_RESULT($has_option)
+CFLAGS="$SAVE_CFLAGS"
+unset has_option
+unset SAVE_CFLAGS
+
+
#### Some other nice autoconf tests.
dnl checks for programs
UNEXEC_OBJ=unexelf.o
case "$opsys" in
+ # MSDOS uses unexec.o
+ # MSWindows uses unexw32.o
aix4-2)
UNEXEC_OBJ=unexaix.o
;;
AC_CHECK_FUNCS(gethostname getdomainname dup2 \
rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt ftime setsid \
strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
utimes getrlimit 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 sync bzero \
+gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
cfmakeraw cfsetspeed isnan copysign)
esac
-PRE_EDIT_LDFLAGS=
-POST_EDIT_LDFLAGS=
if test "x$ORDINARY_LINK" = "xyes"; then
LINKER="\$(CC)"
## searching for libraries in its internal directories, so we have to
## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
LINKER="\$(CC) -nostdlib"
- ## GCC passes any argument prefixed with -Xlinker directly to the linker.
- ## See prefix-args.c for an explanation of why we do not do this with the
- ## shell''s ``for'' construct. Note that sane people do not have '.' in
- ## their paths, so we must use ./prefix-args.
- ## TODO either make prefix-args check ORDINARY_LINK internally,
- ## or remove it altogether (bug#6184), removing the need for this hack.
- PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
- POST_EDIT_LDFLAGS='`'
-fi
-AC_SUBST(PRE_EDIT_LDFLAGS)
-AC_SUBST(POST_EDIT_LDFLAGS)
+fi
test "x$LINKER" = "x" && LINKER=ld
## FIXME? What setting of EDIT_LDFLAGS should this have?
#define my_strftime nstrftime /* for strftime.c */
-/* Some of the files of Emacs which are intended for use with other
- programs assume that if you have a config.h file, you must declare
- the type of getenv. */
-extern char *getenv ();
-
/* These default definitions are good for almost all machines.
The exceptions override them in m/MACHINE.h. */
/* Define if the compiler supports function prototypes. It may do so but
not define __STDC__ (e.g. DEC C by default) or may define it as zero. */
#undef PROTOTYPES
-/* For mktime.c: */
-#ifndef __P
-# if defined PROTOTYPES
-# define __P(args) args
-# else
-# define __P(args) ()
-# endif /* GCC. */
-#endif /* __P */
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h> /* May be needed for bcopy & al. */
-#endif
-
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
# endif
#endif
-#ifndef HAVE_BCOPY
-#define bcopy(a,b,s) memcpy (b,a,s)
-#endif
-#ifndef HAVE_BZERO
-#define bzero(a,s) memset (a,0,s)
-#endif
-#ifndef HAVE_BCMP
-#define BCMP memcmp
-#endif
-
#endif /* EMACS_CONFIG_H */
/*