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
;;
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?