summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 2598614007cd80f2a2db39e268bfeb0f52c83c60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#AC_PREREQ([2.65])
AC_INIT([pa-sink-ctl], [0.1], [web2p10@wemelug.de])
AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR([src/pa-sink-ctl.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Checks for libraries.
AC_CHECK_LIB([ncurses], [newwin], [CURSES_LIBS=-lncurses], [echo "Error: you need ncurses!"; exit 1])
PKG_CHECK_MODULES(PULSE, [libpulse], [], [echo "Error: you need libpulse!"; exit 1])
PKG_CHECK_MODULES(PULSE_MAINLOOP, [libpulse-mainloop-glib], [], [echo "Error: you need libpulse-mainloop-glib"; exit 1])
PKG_CHECK_MODULES(GLIB, [glib-2.0], [], [echo "Error: you need glib!"; exit1])

AC_SUBST(CURSES_LIBS)
AC_SUBST(PULSE_CFLAGS)
AC_SUBST(PULSE_LIBS)

# Checks for header files.
AC_CHECK_HEADERS([stdio.h stdlib.h stdint.h string.h ncurses.h glib.h pulse/pulseaudio.h pulse/glib-mainloop.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT32_T

# Checks for library functions.
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strdup])

AC_OUTPUT