X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=9b4781c72f7602c2edd3f078cfa0945be26d1a35;hp=f80676b7c160621ea258494102e739d2ba50df94;hb=90c3f79dc74229134818e78cb97d315e28ee93b5;hpb=3a82ac4cfdbcade1f5d2bdbe5f96209bd3d14bef diff --git a/autogen.sh b/autogen.sh index f80676b7c..9b4781c72 100755 --- a/autogen.sh +++ b/autogen.sh @@ -17,6 +17,10 @@ set -e +oldpwd=$(pwd) +topdir=$(dirname $0) +cd $topdir + if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then # This part is allowed to fail cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ @@ -53,15 +57,29 @@ args="$args \ " fi +cd $oldpwd + if [ "x$1" = "xc" ]; then - ./configure CFLAGS='-g -Og' $args + $topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $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 -Wno-gnu' --enable-compat-libs --enable-kdbus $args make clean +elif [ "x$1" = "xs" ]; then + scan-build $topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args + scan-build make else echo echo "----------------------------------------------------------------" echo "Initialized build system. For a common configuration please run:" echo "----------------------------------------------------------------" echo - echo "./configure CFLAGS='-g -Og' $args" + echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args" echo fi