summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac8
2 files changed, 8 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 9a5eed3..b68949e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,5 @@
bin_PROGRAMS = pa_sink_ctl
-pa_sink_ctl_SOURCES = interface.c pa-sink-ctl.c sink.c sink_input.c
+pa_sink_ctl_SOURCES =interface.c pa-sink-ctl.c sink.c sink_input.c
+
+AM_CFLAGS =-std=c99 -pedantic -Wall -Werror @PULSE_CFLAGS@
+pa_sink_ctl_LDADD =@PULSE_LIBS@ @CURSES_LIBS@
diff --git a/configure.ac b/configure.ac
index 5aec66b..e6a7615 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,12 +12,12 @@ AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Checks for libraries.
-AC_CHECK_LIB([ncurses], [newwin], [CURSES=-lncurses], [echo "Error: you need ncurses!"; exit 1])
+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])
-# compiler flags
-LDFLAGS="$CURSES $PULSE_LIBS"
-CFLAGS="-std=c99 -pedantic -Wall -Werror $PULSE_CFLAGS"
+AC_SUBST(CURSES_LIBS)
+AC_SUBST(PULSE_CFLAGS)
+AC_SUBST(PULSE_LIBS)
# Checks for header files.
AC_CHECK_HEADERS([stdio.h stdlib.h string.h ncurses.h pulse/pulseaudio.h])