- [m4_fatal([must install xorg-macros before running autoconf/autogen.sh])])
-XORG_MACROS_VERSION([1.2.0])
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+XORG_CHECK_MALLOC_ZERO
+
+# Check for programs
+AC_PROG_LEX
+AC_PROG_YACC
+AC_PATH_PROG([YACC_INST], $YACC)
+if test ! -f "src/xkbcomp/parser.c"; then
+ if test -z "$YACC_INST"; then
+ AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/parser.y])
+ fi
+fi
+
+# Checks for library functions.
+AC_CHECK_FUNCS([strcasecmp strncasecmp])
+if test "x$ac_cv_func_strcasecmp" = xno || \
+ test "x$ac_cv_func_strncasecmp" = xno; then
+ AC_MSG_ERROR([C library does not support strcasecmp/strncasecmp])
+fi
+
+AC_CHECK_FUNCS([eaccess euidaccess])