+dnl Only used temporarily while the spec file is contained in the
+dnl tarball. We will remove this later.
+AC_SUBST([RPM_RELEASE],[2])
+
+dnl Check for basic C environment.
+AC_PROG_CC_STDC
+AC_PROG_INSTALL
+AC_PROG_CPP
+
+AC_C_PROTOTYPES
+test "x$U" != "x" && AC_MSG_ERROR([Compiler not ANSI compliant])
+
+AM_PROG_CC_C_O
+
+AC_PROG_SED
+
+AC_MSG_CHECKING([that a static binary can be built])
+old_CFLAGS="$CFLAGS"
+old_LDFLAGS="$LDFLAGS"
+CFLAGS="$CFLAGS -static"
+LDFLAGS="$LDFLAGS -static"
+AC_LINK_IFELSE([
+ #include <stdio.h>
+ #include <stdlib.h>
+ int main () { exit (0); }
+],[
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Building a static binary failed. Make sure you have static libc installed.])
+])
+