-case "$1" in
- *install|"")
- args="$args --with-libdir-name=$libdir"
- export CFLAGS="$CFLAGS -O2"
- echo " configure: $args"
- echo
- ./configure $args
- ;;
- *devel)
- args="$args --enable-debug --with-libdir-name=$libdir"
- export CFLAGS="$CFLAGS -O0"
- echo " configure: $args"
- echo
- ./configure $args
- ;;
- *clean)
- ./configure
- make maintainer-clean
- find . -name Makefile.in | xargs -r rm
- rm -f depcomp aclocal.m4 config.h.in configure install-sh
- rm -f missing config.guess config.sub ltmain.sh
- exit 0
- ;;
- *)
- echo "Usage: $0 [--install|--devel|--clean]"
- exit 1
- ;;
-esac
+if [ "x$1" = "xc" ]; then
+ $topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args
+ make clean
+elif [ "x$1" = "xt" ]; then
+ $topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus --enable-terminal $args
+ make clean
+elif [ "x$1" = "xg" ]; then
+ $topdir/configure CFLAGS='-g -Og -ftrapv' --enable-compat-libs --enable-kdbus $args
+ make clean
+elif [ "x$1" = "xa" ]; then
+ $topdir/configure CFLAGS='-g -O0 -Wsuggest-attribute=pure -Wsuggest-attribute=const -ftrapv' --enable-compat-libs --enable-kdbus $args
+ make clean
+elif [ "x$1" = "xl" ]; then
+ $topdir/configure CC=clang CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args
+ make clean
+elif [ "x$1" = "xs" ]; then
+ scan-build $topdir/configure CFLAGS='-std=gnu99 -g -O0 -ftrapv' --enable-kdbus $args
+ scan-build make
+else
+ echo
+ echo "----------------------------------------------------------------"
+ echo "Initialized build system. For a common configuration please run:"
+ echo "----------------------------------------------------------------"
+ echo
+ echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args"
+ echo
+fi