Index: ChangeLog
===================================================================
--- ChangeLog	(revision 4745)
+++ ChangeLog	(revision 4748)
@@ -2,4 +2,5 @@
 	* Added support for UNMAPPED volume control (Closes: #55)
 	* Better auth type oder support (Closes: #6)
+	* Updated configure (Closes: #27)
 
 v. 0.4beta3 - Wed Jan 26 2011 23:26 CET
Index: configure
===================================================================
--- configure	(revision 4731)
+++ configure	(revision 4748)
@@ -25,4 +25,6 @@
 LDPATH=''
 INCPATH=''
+
+OPTI_O=2
 
 CROSS_COMPILE=false
@@ -192,4 +194,8 @@
    echo '--incpath DIR               - Add DIR to search list for headers'
    echo '--addpath DIR               - Add DIR/lib to lib, DIR/include to header search list'
+   echo
+   echo '--cflags FLAGS              - Sets additional compiler flags (default: '"$CFLAGS"')'
+   echo '--ldflags FLAGS             - Sets additional linker flags (default: '"$LDFLAGS"')'
+   echo '--opti LEVEL                - Sets optimizer level (default: '"$OPTI_O"')'
    echo
    echo '--cc CC                     - Set name of C compiler (CC) to CC'
@@ -289,4 +295,16 @@
    shift;
   ;;
+  '--cflags')
+   CFLAGS="$2"
+   shift;
+  ;;
+  '--ldflags')
+   LDFLAGS="$2"
+   shift;
+  ;;
+  '--opti')
+   OPTI_O="$2"
+   shift;
+  ;;
   '--cc')
    CC="$2"
@@ -1086,5 +1104,5 @@
 [ "$DEFAULT_GRP" = '' ] && DEFAULT_GRP='audio'
 
-CCTF="$CC $CFLAGS $LDPATH $INCPATH -Iinclude/ -o $TF_E $TF_C"
+CCTF="$CC $CFLAGS $LDFLAGS $LDPATH $INCPATH -Iinclude/ -o $TF_E $TF_C"
 
 if [ "$MMCU" != '' ]
@@ -1126,5 +1144,8 @@
  echo "INCPATH=$INCPATH"
  echo
- [ "$CFLAGS" != '' ] && echo "CFLAGS+=$CFLAGS"
+ echo "OPTI_O=-O$OPTI_O"
+ echo
+ [ "$CFLAGS"  != '' ] && echo "CFLAGS  += $CFLAGS"
+ [ "$LDFLAGS" != '' ] && echo "LDFLAGS += $LDFLAGS"
  echo
  echo "EXEC_HELPER=$EXEC_HELPER"
Index: libroar/Makefile
===================================================================
--- libroar/Makefile	(revision 4586)
+++ libroar/Makefile	(revision 4748)
@@ -15,6 +15,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroar
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH)
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH)
 LIBS    = $(LIBROAR_NS)
 
Index: libroararts/Makefile
===================================================================
--- libroararts/Makefile	(revision 4559)
+++ libroararts/Makefile	(revision 4748)
@@ -8,6 +8,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarpulse
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(LDPATH) -L../lib/
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: libroardsp/Makefile
===================================================================
--- libroardsp/Makefile	(revision 4513)
+++ libroardsp/Makefile	(revision 4748)
@@ -16,6 +16,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroardsp
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)
 
 LIBS      = $(LIBROARDSP_NS)
Index: libroareio/Makefile
===================================================================
--- libroareio/Makefile	(revision 3851)
+++ libroareio/Makefile	(revision 4748)
@@ -11,6 +11,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroareio
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)
 LIBS    = $(LIBROAREIO_NS)
 
Index: libroaresd/Makefile
===================================================================
--- libroaresd/Makefile	(revision 4559)
+++ libroaresd/Makefile	(revision 4748)
@@ -10,6 +10,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroaresd
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: libroarlight/Makefile
===================================================================
--- libroarlight/Makefile	(revision 3752)
+++ libroarlight/Makefile	(revision 4748)
@@ -9,6 +9,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarlight
-CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)
 LIBS    = $(LIBROARLIGHT_NS)
 
Index: libroarmidi/Makefile
===================================================================
--- libroarmidi/Makefile	(revision 3752)
+++ libroarmidi/Makefile	(revision 4748)
@@ -9,6 +9,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarmidi
-CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) -L../lib/ $(LDPATH)
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) -L../lib/ $(LDPATH)
 LIBS    = $(LIBROARMIDI_NS)
 
Index: libroaross/Makefile
===================================================================
--- libroaross/Makefile	(revision 4559)
+++ libroaross/Makefile	(revision 4748)
@@ -9,6 +9,6 @@
 #DEFINES = -DDEBUG
 INCLUDE = -I../include -I../include/libroar
-CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib
 LIBS    = $(LIBROAR) $(LIBROARLIGHT) $(lib_dl)
 
Index: libroarpulse/Makefile
===================================================================
--- libroarpulse/Makefile	(revision 4559)
+++ libroarpulse/Makefile	(revision 4748)
@@ -14,6 +14,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarpulse
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(LDPATH) -L../lib/ -L.
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(LDPATH) -L../lib/ -L.
 LIBS    = $(LIBROAR)
 
Index: libroarrsound/Makefile
===================================================================
--- libroarrsound/Makefile	(revision 4559)
+++ libroarrsound/Makefile	(revision 4748)
@@ -9,6 +9,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarrsound
-CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: libroarsndio/Makefile
===================================================================
--- libroarsndio/Makefile	(revision 4559)
+++ libroarsndio/Makefile	(revision 4748)
@@ -9,6 +9,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroarsndio
-CFLAGS += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: libroaryiff/Makefile
===================================================================
--- libroaryiff/Makefile	(revision 4559)
+++ libroaryiff/Makefile	(revision 4748)
@@ -7,6 +7,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I../include/libroaryiff
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../lib/
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../lib/
 LIBS    = $(LIBROAR)
 
Index: plugins/alsa/Makefile
===================================================================
--- plugins/alsa/Makefile	(revision 4194)
+++ plugins/alsa/Makefile	(revision 4748)
@@ -11,6 +11,6 @@
 #DEBUG=-DDEBUG -DXXX
 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
-CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(DEBUG) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE $(pthread)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib $(pthread)
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) -I../../include $(DEFINES) $(DEBUG) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE $(pthread)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../../lib $(pthread)
 LIBS    = $(LIBROAR) $(lib_m) $(lib_dl) -lrt $(lib_asound)
 
Index: plugins/alsavs/Makefile
===================================================================
--- plugins/alsavs/Makefile	(revision 4194)
+++ plugins/alsavs/Makefile	(revision 4748)
@@ -11,6 +11,6 @@
 #DEBUG=-DDEBUG -DXXX
 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
-CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(DEBUG) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE $(pthread)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib $(pthread)
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) -I../../include $(DEFINES) $(DEBUG) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) -I/usr/include/alsa -D_GNU_SOURCE $(pthread)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../../lib $(pthread)
 LIBS    = $(LIBROAR) $(lib_m) $(lib_dl) -lrt $(lib_asound)
 
Index: plugins/ao/Makefile
===================================================================
--- plugins/ao/Makefile	(revision 3234)
+++ plugins/ao/Makefile	(revision 4748)
@@ -7,6 +7,6 @@
 
 #DEFINES=-DDEBUG
-CFLAGS += -g -Wall -O2 -I../../include $(DEFINES) $(HAVE_MATRIX) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(AO_CFLAGS)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib
+CFLAGS += -g -Wall $(OPTI_O) -I../../include $(DEFINES) $(HAVE_MATRIX) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(AO_CFLAGS)
+LDFLAGS+= -g $(SHARED) $(LDPATH) -L../../lib
 LIBS    = $(LIBROAR) $(AO_LIBS)
 
Index: plugins/audacious/Makefile
===================================================================
--- plugins/audacious/Makefile	(revision 3105)
+++ plugins/audacious/Makefile	(revision 4748)
@@ -8,6 +8,6 @@
 
 #DEFINES=-DDEBUG
-CFLAGS += -g -Wall -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GTK_CFLAFS) $(XMMS_CFLAGS)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib
+CFLAGS += -g -Wall $(OPTI_O) -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: plugins/gstreamer0.10/Makefile
===================================================================
--- plugins/gstreamer0.10/Makefile	(revision 2383)
+++ plugins/gstreamer0.10/Makefile	(revision 4748)
@@ -10,6 +10,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I. -I../include -I../include/libroar
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GST_CFLAGS)
-LDFLAGS = -g -L../lib/ $(SHARED) $(LDPATH) $(LIBROAR) $(GST_LIBS) -lgstaudio-0.10
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GST_CFLAGS)
+LDFLAGS+= -g -L../lib/ $(SHARED) $(LDPATH) $(LIBROAR) $(GST_LIBS) -lgstaudio-0.10
 
 all: $(TARGETS)
Index: plugins/xine/Makefile
===================================================================
--- plugins/xine/Makefile	(revision 3095)
+++ plugins/xine/Makefile	(revision 4748)
@@ -10,5 +10,5 @@
 #DEFINES=-DDEBUG
 CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE) $(fPIC) $(XINE_CFLAGS)
-LDFLAGS = -g -shared -lroar $(XINE_LIBS)
+LDFLAGS+= -g -shared -lroar $(XINE_LIBS)
 
 all: ${TARGET}
Index: plugins/xmms/Makefile
===================================================================
--- plugins/xmms/Makefile	(revision 3752)
+++ plugins/xmms/Makefile	(revision 4748)
@@ -8,6 +8,6 @@
 
 #DEFINES=-DDEBUG
-CFLAGS += -g -Wall $(Wextra) -O2 -I../../include $(DEFINES) $(INCLUDE) $(INCPATH) $(SHARED_CF) $(fPIC) $(GTK_CFLAFS) $(XMMS_CFLAGS)
-LDFLAGS = -g $(SHARED) $(LDPATH) -L../../lib
+CFLAGS += -g -Wall $(Wextra) $(OPTI_O) -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 4223)
+++ roarclients/Makefile	(revision 4748)
@@ -17,6 +17,6 @@
 DEFINES    = -DCOMMON_VERSION=\"$(COMMON_VERSION)\" -DPREFIX=\"$(PREFIX)\" -DPREFIX_LIB=\"$(PREFIX_LIB)\" -DPREFIX_INC=\"$(PREFIX_INC)\"
 INCLUDE    = -I../include -I./include
-CFLAGS    += -g -Wall $(Wextra) -O2 $(DEFINES) $(INCLUDE) $(INCPATH)
-LDFLAGS    = -g -L../lib/ $(LDPATH)
+CFLAGS    += -g -Wall $(Wextra) $(OPTI_O) $(DEFINES) $(INCLUDE) $(INCPATH)
+LDFLAGS   += -g -L../lib/ $(LDPATH)
 LIBS       = $(LIBROAR)
 SHOUTLIBS  = $(lib_shout) $(LIBS)
Index: roard/Makefile
===================================================================
--- roard/Makefile	(revision 4699)
+++ roard/Makefile	(revision 4748)
@@ -18,6 +18,6 @@
 PKGDEFINES= -DPACKAGE_VERSION="\"$(VERSION)\"" -DDEVICE_VENDOR_ID=$(DEV_VENDOR) -DDEVICE_VENDOR_NAME="\"$(DEV_VENDOR_NAME)\"" -DDEVICE_VENDOR_STRING="\"$(DEV_VENDOR_STRING)\"" -DDISTRIBUTION_VERSION_STRING="\"$(DISTRIBUTION_VERSION_STRING)\""
 INCLUDE   = -I../include -I./include
-CFLAGS   += -g -Wall -O2 $(DEFINES) $(PKGDEFINES) $(INCLUDE) $(INCPATH)
-LDFLAGS   = -g -rdynamic -L../lib/ $(LDPATH)
+CFLAGS   += -g -Wall $(OPTI_O) $(DEFINES) $(PKGDEFINES) $(INCLUDE) $(INCPATH)
+LDFLAGS  += -g -rdynamic -L../lib/ $(LDPATH)
 DRVLIBS   = $(lib_esd) $(lib_ossaudio) $(lib_ao) $(lib_shout) $(lib_sndio) $(lib_rsound) $(lib_portaudio) $(lib_pablio) $(lib_asound) $(lib_winmm) $(lib_pulse_simple) $(lib_jack)
 CODEC_CELT= $(lib_celt) $(lib_celt0)
Index: roarfish/Makefile
===================================================================
--- roarfish/Makefile	(revision 4632)
+++ roarfish/Makefile	(revision 4748)
@@ -8,6 +8,6 @@
 #DEFINES        = -DDEBUG
 INCLUDE = -I../include -I./include
-CFLAGS += -g -Wall -O2 $(DEFINES) $(INCLUDE)
-LDFLAGS = -g -L../lib/ $(LDPATH)
+CFLAGS += -g -Wall $(OPTI_O) $(DEFINES) $(INCLUDE)
+LDFLAGS+= -g -L../lib/ $(LDPATH)
 LIBS    = -lroar -lfishsound -loggz
 
