fi
WERROR_CFLAGS=
-# When compiling with GCC, prefer -isystem to -I when including system
-# include files, to avoid generating useless diagnostics for the files.
AS_IF([test $gl_gcc_warnings = no],
[
- isystem='-I'
AS_IF([test "$emacs_cv_clang" = yes],
[
# Turn off some warnings if supported.
gl_WARN_ADD([-Wno-unknown-pragmas])
])
],[
- isystem='-isystem '
-
# This, $nw, is the list of warnings we disable.
nw=
nw="$nw -Wcast-align=strict" # Emacs is tricky with pointers.
nw="$nw -Wduplicated-branches" # Too many false alarms
nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 110333
- nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
nw="$nw -Woverlength-strings" # Not a problem these days
nw="$nw -Wvla" # Emacs uses <vla.h>.
nw="$nw -Wunused-const-variable=2" # lisp.h declares const objects.
edit_cflags="
s,///*,/,g
- s/^/ /
- s/ -I/ $isystem/g
- s/^ //
"
AC_ARG_ENABLE([link-time-optimization],
AC_SUBST([LD_SWITCH_X_SITE_RPATH])
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
- C_SWITCH_X_SITE=$isystem`AS_ECHO(["$x_includes"]) | sed -e "s/:/ $isystem/g"`
+ C_SWITCH_X_SITE=-I`AS_ECHO(["$x_includes"]) | sed -e "s/:/ -I/g"`
fi
if test x"${x_includes}" = x; then
GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
- CPPFLAGS="$CPPFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
- CFLAGS="$CFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
+ CPPFLAGS="$CPPFLAGS -I ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
+ CFLAGS="$CFLAGS -I ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
xcsdkdir="" ;;
esac
fi
- CPPFLAGS="$CPPFLAGS -isystem${xcsdkdir}/usr/include/libxml2"
+ CPPFLAGS="$CPPFLAGS -I${xcsdkdir}/usr/include/libxml2"
AC_CHECK_HEADER([libxml/HTMLparser.h],
[AC_CHECK_DECL([HTML_PARSE_RECOVER], [HAVE_LIBXML2=yes], [],
[#include <libxml/HTMLparser.h>])])
CPPFLAGS="$SAVE_CPPFLAGS"
if test "${HAVE_LIBXML2}" = "yes"; then
- LIBXML2_CFLAGS="-isystem${xcsdkdir}/usr/include/libxml2"
+ LIBXML2_CFLAGS="-I${xcsdkdir}/usr/include/libxml2"
LIBXML2_LIBS="-lxml2"
fi
fi