more keymap translations
[yterm.git] / 0build.sh
blob0011e044208a88fb589fed329ca3f8a7cdc8be01
1 #!/bin/sh
3 CRAP_DEFS=""
4 CRAP_FLAGS=""
7 if [ "z$1" = "z-h" ]; then
8 echo "there is only one option: --crapberra"
9 echo "it means: use libcanberra (whatever it is)"
10 exit 1
11 elif [ "z$1" = "z--crapberra" ]; then
12 CRAP_DEFS="-DUSE_CRAPBERRA"
13 CRAP_FLAGS="-ldl"
14 elif [ "z$1" != "z" ]; then
15 echo "wut? use -h!"
16 exit 1
20 pkg-config --exists x11
21 res=$?
22 if [ "$res" -ne 0 ]; then
23 echo "i want Xlib!"
24 exit 1
27 XLIB_FLAGS=`pkg-config --cflags --libs x11`
29 odir=`pwd`
30 mdir=`dirname "$0"`
31 cd "$mdir"
33 CFLAGS="$CFLAGS -fwrapv -fno-delete-null-pointer-checks -fno-strict-aliasing -fno-diagnostics-show-caret"
34 if [ "z$GCC" = "z" ]; then
35 GCC="gcc"
38 $GCC -std=gnu99 -O2 -Wall $CFLAGS -s src/yterm_main.c -o yterm $CRAP_DEFS $XLIB_FLAGS $CRAP_FLAGS -lrt -lutil
39 res=$?
41 cd "$odir"
42 exit $res