AC_DEFUN([AB_EXTRA_PATH],
[
   AC_ARG_WITH([extra-include-dir],
      AC_HELP_STRING([--with-extra-include-dir=DIR], [extra headers are in DIR]),
      ac_with_extra=$withval
      if test "x${ac_with_extra}" != xyes && test "x${ac_with_extra}" != xno; then
            CXXFLAGS="-I$withval $CXXFLAGS"
      fi
   )

   AC_ARG_WITH([extra-lib-dir],
      AC_HELP_STRING([--with-extra-lib-dir=DIR], [extra libraries are in DIR]),
      ac_with_extra=$withval
      if test "x${ac_with_extra}" != xyes && test "x${ac_with_extra}" != xno; then
            LDFLAGS="-L$withval $LDFLAGS"
      fi
   )
])

AC_DEFUN([AB_DEBUG],
[
AC_ARG_ENABLE(debug,
              AC_HELP_STRING([--disable-debug], 
                             [Build without -DDEBUG -g -ggdb -O0 -Wall (default on)]),
              [ac_request_debug=$enableval], 
              [ac_request_debug=yes])

if test "x$ac_request_debug" = xyes; then
   AC_MSG_NOTICE(Build with -DDEBUG  -g -ggdb -O0 -Wall)
   CPPFLAGS="$CPPFLAGS -DDEBUG -g -ggdb -O0 -Wall"
fi

])

AC_DEFUN([AB_USELIBONLY],
[
libdir='${prefix}/lib'
AC_SUBST(libdir)
pythondir='${libdir}/python/site-packages'
AC_SUBST(pythondir)
pyexecdir='${libdir}/python/site-packages'
AC_SUBST(pyexecdir)
])

