CFLAGS="$CFLAGS $X_CFLAGS"
LIBS=`echo "$LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
AC_CACHE_CHECK([for -rpath dynamic library path recording], rxvt_cv_rpath,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
+#include <stdlib.h>
main()
{
exit(0);
changequote([, ])dnl
LIBS=`echo "$ac_save_LIBS $X_LIBS $X_EXTRA_LIBS -lX11" | sed "$R_TRANSLATE"`
AC_CACHE_CHECK([for -R dynamic library path recording], rxvt_cv_R,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
+#include <stdlib.h>
main()
{
exit(0);
fi
AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <X11/Xlib.h>
+#include <stdlib.h>
main() {
char *p;
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)