summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac56
1 files changed, 56 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..c0eb433
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,56 @@
+AC_INIT([dwxinfo], [0.1.0])
+
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
+AM_SILENT_RULES([yes])
+
+: ${CFLAGS="-O2"}
+
+AC_PROG_CC
+AC_C_CONST
+AC_C_VARARRAYS
+AC_FUNC_MALLOC
+AC_PROG_SED
+AC_CHECK_INCLUDES_DEFAULT
+
+AC_CHECK_HEADER([fcntl.h], [], [
+ echo "Missing fcntl.h header"
+ exit -1
+])
+
+AC_CHECK_HEADER([errno.h], [], [
+ echo "Missing errno.h header"
+ exit -1
+])
+
+AC_CHECK_HEADER([signal.h], [], [
+ echo "Missing signal.h header"
+ exit -1
+])
+
+AC_CHECK_HEADER([poll.h], [], [
+ echo "Missing poll.h header"
+ exit -1
+])
+
+PKG_CHECK_MODULES([LIBPULSE], [libpulse])
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [enable debugging, default: yes]),
+ [case "${enableval}" in
+ yes) debug=true ;;
+ no) debug=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+ esac],
+ [debug=true])
+
+if test x"$debug" = x"true"; then
+ CFLAGS="$CFLAGS -g"
+fi
+
+CFLAGS="$CFLAGS -Wall"
+
+AC_CONFIG_FILES([
+ Makefile
+])
+AC_OUTPUT