-AC_PATH_PROG([regex_cmd], [sed])
-test "$regex_cmd" || AC_MSG_ERROR([sed not found])
-
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_LIBTOOL
-LIBTOOL="$LIBTOOL --silent"
-AC_PROG_INSTALL
-
-ALL_LINGUAS=""
-AM_GNU_GETTEXT
-
-# AC_LANG(C++)
-
-# Check what compiler we are using
-AC_MSG_CHECKING([for GCC])
-if test "$GCC" = "yes"; then
- AC_MSG_RESULT([yes])
- CFLAGS="$CFLAGS -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 CFLAGS)
- lang_std_not_set=`echo $CFLAGS | grep "\-LANG:std"`
- if test "x$lang_std_not_set" = "x"; then
- AC_MSG_RESULT([not set, setting.])
- CFLAGS="${CFLAGS} -LANG:std"
- else
- AC_MSG_RESULT([already set.])
- fi
- fi
-fi
-
-# Determine if maintainer portions of the Makefiles should be included.
-AM_MAINTAINER_MODE
-
-# Check for system header files
-AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h stdlib.h string.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h)
-AC_HEADER_TIME
-
-# Determine the return type of signal handlers
-AC_TYPE_SIGNAL
-
-# Check whether to include debugging code
-DEBUG=""
-AC_MSG_CHECKING([whether to include verbose debugging code])
-AC_ARG_ENABLE([debug],
- [ --enable-debug include verbose debugging code @<:@default=no@:>@],
- if test "$enableval" = "yes"; then
- AC_MSG_RESULT([yes])
- if test "$GCC" = "yes"; then
- DEBUG="-DDEBUG -fno-inline -g"
- else
- DEBUG="-DDEBUG"
- fi
- else
- AC_MSG_RESULT([no])
- DEBUG="-DNDEBUG"
- fi,
- AC_MSG_RESULT([no])
- DEBUG="-DNDEBUG"
-)
-CFLAGS="$CFLAGS $DEBUG"
-
-# Check for Python
-AC_ARG_WITH([python],
- [ --with-python=path Set location of Python executable],
- [PYTHON="$withval"],
- [PYTHON=])
-
-# Find the python bin
-if ! test "$PYTHON"; then
- AC_CHECK_PROGS(PYTHON, $prefix/bin/python python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 python1.4)
-fi
-if ! test "$PYTHON"; then
- AC_MSG_ERROR([Openbox requires the use of Python. This is its secret special formula for extreme sexiness.
-See http://www.python.org
-])
-fi
-
-# Find our python paths
-AC_MSG_CHECKING([for Python version])
-# Need to do this hack since autoconf replaces __file__ with the name of the configure file
-filehack="file__"
-PYVERSION=`($PYTHON -c "import string,operator; print operator.getitem(string.split(string.__$filehack,'/'),-2)")`
-AC_MSG_RESULT([$PYVERSION])
-
-AC_MSG_CHECKING([for Python prefix])
-PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null`
-AC_MSG_RESULT([$PYPREFIX])
-AC_MSG_CHECKING([for Python exec-prefix])
-PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null`
-AC_MSG_RESULT([$PYEPREFIX])
-
-# Find the include directory
-AC_MSG_CHECKING([for Python header files])
-if test -r "$PYPREFIX/include/$PYVERSION/Python.h"; then
- PYTHON_CFLAGS="-I$PYPREFIX/include/$PYVERSION"
-fi
-if test -z "$PYTHON_CFLAGS"; then
- if test -r "$PYPREFIX/include/Py/Python.h"; then
- PYTHON_CFLAGS="-I$PYPREFIX/include/Py"
- fi
-fi
-if ! test "$PYTHON_CFLAGS"; then
- AC_MSG_ERROR([Not found])
-else
- AC_MSG_RESULT([$PYTHON_CFLAGS])
-fi
-
-# Set the library directory blindly. This probably won't work with older versions
-AC_MSG_CHECKING([for Python library])
-dirs="$PYVERSION/config $PYVERSION/lib python/lib"
-for i in $dirs; do
- if test -d "$PYEPREFIX/lib/$i"; then
- PYLIB="$PYEPREFIX/lib/$i"
- break
- fi
-done
-if ! test "$PYLIB"; then
- AC_MSG_ERROR([Not found])
-else
- AC_MSG_RESULT([$PYLIB])
-fi