tce-load -i glib2-dev gssdp-dev gupnp-dev bash gupnp-dlna-dev dleyna-core-dev

cd dleyna-server-0.4.0

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti"  ./configure --prefix=/usr/local --disable-static --localstatedir=/var --libexecdir=/usr/local/lib/dleyna-server

find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \;

make
sudo make install

dleyna-server Version 0.4.0

Prefix    : '/usr/local'
Compiler  : 'gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe'
CFLAGS    : '-Wall -O2 -D_FORTIFY_SOURCE=2 -Wno-format-extra-args'

-Package features:
        - enable-werror         : no
        - enable-debug          : no
        - enable-never-quit     : no
        - with-connector-name   : dbus
        - disable-optimization  : no
        - with-log-level        : 7
        - with-log-type         : 0
        - with-ua-prefix        : 
        - enable-lib-only       : no
        - with-dbus-service-dir : ${datarootdir}/dbus-1/services