From d9b456d738e5013d48f41f5e6315ef7c22d6acf0 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Sep 2025 19:37:28 +0100 Subject: Initial commit --- configure.ac | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') 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 -- cgit v1.2.3