-AC_INIT
-AC_CONFIG_SRCDIR([src/main.cc])
-AM_INIT_AUTOMAKE([openbox], [2.90.0])
-
-dnl Determine default prefix
-test "$prefix" = "NONE" && prefix="$ac_default_prefix"
-
-dnl We're in the C++ world
-AC_LANG(C++)
-
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-AC_CHECK_PROGS([regex_cmd], [sed])
-if test x$regex_cmd = "x"; then
- AC_MSG_ERROR([error. sed is required to build the default menu file.])
-fi
-
-dnl Check what compiler we are using
-AC_MSG_CHECKING([for GCC])
-if test "$GCC" = "yes"; then
- AC_MSG_RESULT([yes])
- CPPFLAGS="$CPPFLAGS -Wall -W -pedantic"
-else
- AC_MSG_RESULT([no, trying other compilers])
- AC_MSG_CHECKING(for MIPSpro)
- mips_pro_ver=`$CXX -version 2>&1 | grep -i mipspro | cut -f4 -d ' '`
- if test -z "$mips_pro_ver"; then
- AC_MSG_RESULT([no])
- else
- AC_MSG_RESULT([yes, version $mips_pro_ver.])
- AC_MSG_CHECKING(for -LANG:std in CPPFLAGS)
- lang_std_not_set=`echo $CPPFLAGS | grep "\-LANG:std"`
- if test "x$lang_std_not_set" = "x"; then
- AC_MSG_RESULT([not set, setting.])
- CPPFLAGS="${CPPFLAGS} -LANG:std"
- else
- AC_MSG_RESULT([already set.])
- fi
- fi
+AC_PREREQ([2.50])
+AC_INIT([openbox], [2.90.0cvs], [http://bugzilla.icculus.org])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([kernel/openbox.c])
+
+AC_PREFIX_DEFAULT([/usr/local])
+test "$prefix" = "NONE" && prefix=$ac_default_prefix
+
+AC_PATH_PROG([SED], [sed])
+test "$SED" || AC_MSG_ERROR([sed not found])
+
+# Determine build target
+OB_DEBUG
+# Pick compiler specific/build target flags, and set $CVS
+OB_COMPILER_FLAGS
+AC_C_CONST
+AC_C_INLINE
+
+if test "$CVS" = "yes"; then
+ AC_PATH_PROG([FLEX], [flex])
+ test "$FLEX" || AC_MSG_ERROR([flex not found])
+
+ AC_PATH_PROG([BISON], [bison])
+ test "BISON" || AC_MSG_ERROR([bison not found])