Index: configure
===================================================================
--- configure	(revision 3750)
+++ configure	(revision 3752)
@@ -25,4 +25,5 @@
 SHARED_SUFFIX='.so'
 fPIC=true
+Wextra=false
 MMCU=''
 PKG_CONFIG=false
@@ -847,7 +848,22 @@
 [ "$DEFAULT_GRP" = '' ] && DEFAULT_GRP='audio'
 
+CCTF="$CC $LDPATH $INCPATH -Iinclude/ -o $TF_E $TF_C"
+
 if [ "$MMCU" != '' ]
 then
  CC="$CC -mmcu=$MMCU"
+fi
+
+# Check for -Wextra
+#Wextra
+echo -n "checking if compiler supports -Wextra... "
+echo 'int main (void) { return 0; }' > $TF_C
+if $CCTF -Wextra 2> /dev/null;
+then
+ echo yes
+ Wextra=true
+else
+ echo no
+ Wextra=false
 fi
 
@@ -857,5 +873,6 @@
  echo "SHARED_CF=$SHARED_CF"
  echo "SHARED_SUFFIX=$SHARED_SUFFIX"
- $fPIC && echo 'fPIC=-fPIC'
+ $fPIC   && echo 'fPIC=-fPIC'
+ $Wextra && echo 'Wextra=-Wextra'
  echo
  echo "CC=$CC"
@@ -883,6 +900,4 @@
  echo "subdir_libroaross=libroaross" # this builds an empty file in case of not supported
 } >&4
-
-CCTF="$CC $LDPATH $INCPATH -Iinclude/ -o $TF_E $TF_C"
 
 {
Index: libroarlight/Makefile
===================================================================
--- libroarlight/Makefile	(revision 3636)
+++ libroarlight/Makefile	(revision 3752)
@@ -9,5 +9,5 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarlight
-CFLAGS += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
 LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
 LIBS    = $(LIBROARLIGHT_NS)
Index: libroarmidi/Makefile
===================================================================
--- libroarmidi/Makefile	(revision 3638)
+++ libroarmidi/Makefile	(revision 3752)
@@ -9,5 +9,5 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarmidi
-CFLAGS += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
 LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
 LIBS    = $(LIBROARMIDI_NS)
Index: libroaross/Makefile
===================================================================
--- libroaross/Makefile	(revision 3639)
+++ libroaross/Makefile	(revision 3752)
@@ -9,5 +9,5 @@
 #DEFINES = -DDEBUG
 INCLUDE = -I../include -I../include/libroar
-CFLAGS += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib
 LIBS    = $(LIBROAR) $(LIBROARLIGHT) $(lib_dl)
Index: libroarrsound/Makefile
===================================================================
--- libroarrsound/Makefile	(revision 3703)
+++ libroarrsound/Makefile	(revision 3752)
@@ -9,5 +9,5 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarrsound
-CFLAGS += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
Index: libroarsndio/Makefile
===================================================================
--- libroarsndio/Makefile	(revision 3640)
+++ libroarsndio/Makefile	(revision 3752)
@@ -9,5 +9,5 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarsndio
-CFLAGS += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
Index: plugins/alsa/Makefile
===================================================================
--- plugins/alsa/Makefile	(revision 3747)
+++ plugins/alsa/Makefile	(revision 3752)
@@ -10,5 +10,5 @@
 #DEFINES=-DDEBUG
 DEFINES=-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alsa-plugins\" -DVERSION=\"1.0.13\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBASOUND=1 -D_REENTRANT -DDEBUG
-CFLAGS += -g -Wall -Wextra -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE
+CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib 
 LIBS    = $(LIBROAR) -lm -ldl /usr/lib/libasound.so
Index: plugins/alsavs/Makefile
===================================================================
--- plugins/alsavs/Makefile	(revision 3747)
+++ plugins/alsavs/Makefile	(revision 3752)
@@ -10,5 +10,5 @@
 #DEFINES=-DDEBUG
 DEFINES=-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"alsa-plugins\" -DVERSION=\"1.0.13\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBASOUND=1 -D_REENTRANT -DDEBUG
-CFLAGS += -g -Wall -Wextra -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE
+CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib 
 LIBS    = $(LIBROAR) -lm -ldl /usr/lib/libasound.so
Index: plugins/xmms/Makefile
===================================================================
--- plugins/xmms/Makefile	(revision 3619)
+++ plugins/xmms/Makefile	(revision 3752)
@@ -8,5 +8,5 @@
 
 #DEFINES=-DDEBUG
-CFLAGS += -g -Wall -Wextra -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GTK_CFLAFS) $(XMMS_CFLAGS)
+CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GTK_CFLAFS) $(XMMS_CFLAGS)
 LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib
 LIBS    = $(LIBROAR) $(GTK_LIBS) $(XMMS_LIBS)
Index: roarclients/Makefile
===================================================================
--- roarclients/Makefile	(revision 3669)
+++ roarclients/Makefile	(revision 3752)
@@ -16,5 +16,5 @@
 #DEFINES        = -DDEBUG
 INCLUDE    = -I../include -I./include
-CFLAGS    += -g -Wall -Wextra -O2 $(DEFINES) $(INCLUDE) $(INCPATH)
+CFLAGS    += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH)
 LDFLAGS    = -g -L../lib/ $(LDPATH)
 LIBS       = $(LIBROAR)
