AC_PREREQ(2.69)
AC_INIT(pmbw, 0.6)
AC_CONFIG_SRCDIR(pmbw.cc)
AC_CONFIG_AUX_DIR(acscripts)
AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE
if test "$CXXFLAGS" == ""; then
CXXFLAGS="-g -O2"
fi
AC_PROG_CXX
AC_LANG([C++])
save_cxxflags="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -march=x86-64"
AC_MSG_CHECKING([whether $CXX supports -march=x86-64])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no]); CXXFLAGS="$save_cxxflags"]
)
AC_CHECK_LIB(pthread, pthread_mutex_init,
[LIBS="$LIBS -lpthread"],
[AC_MSG_ERROR(pthread library needed!)]
)
AC_CHECK_LIB(rt, clock_gettime,
[LIBS="$LIBS -lrt"],
[AC_MSG_ERROR(rt library needed!)]
)
AC_OUTPUT([Makefile])