tce-load -i compiletc automake libtool-dev intltool coreutils texinfo cd gpm-1.20.7 sed -i -e 's::"headers/gpm.h":' src/prog/display-buttons.c sed -i -e 's::"headers/gpm.h":' src/prog/display-coords.c sed -i -e 's::"headers/gpm.h":' src/prog/get-versions.c patch -Np1 -i ../gpm-1.20.7-glibc_2.26-1.patch ./autogen.sh for ac_header in syslog.h linux/input.h linux/joystick.h ncursesw/ncurses.h ncursesw/curses.h curses.h for i in tinfo ncursesw termcap termlib; do for i in ncursesw curses; do 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 find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; make sudo make install cd /usr/local/lib sudo ln -s libgpm.so.2.1.0 libgpm.so sudo chmod 755 /usr/local/lib/libgpm.so.2.1.0 sudo install -m644 conf/gpm-root.conf /usr/local/etc