From 711806a631bc33f07ee40af8736e0721e766c26d Mon Sep 17 00:00:00 2001 From: ben Date: Sun, 11 Jul 2010 22:04:15 +0200 Subject: move {C,LD}FLAGS from configure.ac to Makefile.am --- Makefile.am | 5 ++++- configure.ac | 8 ++++---- 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]) -- cgit