summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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