summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-10-19 22:03:17 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-10-19 22:03:17 +0200
commit0b3b7d58838165089ac398f4b32a025ca6e7f825 (patch)
treeb1d8a1511fbebc0ff010a574418252a5cadbadc3
parentbc05ee0e7d8749024c39d20f9a85441bb4c9fc33 (diff)
downloadpa-sink-ctl-0b3b7d58838165089ac398f4b32a025ca6e7f825.tar.gz
pa-sink-ctl-0b3b7d58838165089ac398f4b32a025ca6e7f825.tar.bz2
pa-sink-ctl-0b3b7d58838165089ac398f4b32a025ca6e7f825.zip
Define gcc specific flags in configure
-rw-r--r--configure.ac6
-rw-r--r--src/Makefile.am2
2 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2c8e53d..5c011e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,12 @@ PKG_CHECK_MODULES(PULSE, [libpulse], [], AC_MSG_ERROR([libpulse required]))
PKG_CHECK_MODULES(PULSE_MAINLOOP, [libpulse-mainloop-glib], [], AC_MSG_ERROR([libpulse-mainloop-glib required]))
PKG_CHECK_MODULES(GLIB, [glib-2.0], [], AC_MSG_ERROR([glib required]))
+if test "x$GCC" = "xyes"; then
+ GCC_CFLAGS="-Wall -Werror -pedantic -std=c99 -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
+fi
+AC_SUBST(GCC_CFLAGS)
+
+
AC_SUBST(CURSES_LIBS)
AC_CHECK_HEADERS([ncurses.h sys/ioctl.h unistd.h signal.h])
diff --git a/src/Makefile.am b/src/Makefile.am
index 6f858f9..c73f0d7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,7 @@
bin_PROGRAMS = pa-sink-ctl
pa_sink_ctl_SOURCES = interface.c pa-sink-ctl.c sink.c sink_input.c g_unix_signal.c g_curses_input.c
-AM_CFLAGS = -std=c99 -pedantic -Wall -Werror @PULSE_CFLAGS@ @PULSE_MAINLOOP_CFLAGS@ @GLIB_CFLAGS@
+AM_CFLAGS = $(GCC_CFLAGS) @PULSE_CFLAGS@ @PULSE_MAINLOOP_CFLAGS@ @GLIB_CFLAGS@
pa_sink_ctl_LDADD = @GLIB_LIBS@ @PULSE_LIBS@ @PULSE_MAINLOOP_LIBS@ @CURSES_LIBS@
noinst_HEADERS = interface.h pa-sink-ctl.h sink.h sink_input.h g_unix_signal.h g_curses_input.h