X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=4823fe715840e877fad33c651764411d8d512f0c;hp=d0a2f3fee2436dc1c0cb81224d6cb1e99db13c9c;hb=cef8b0735831b2bfeaf21d8a245d8024c3de816a;hpb=626851be97b4332fc0401d754c81ae7bbc0f5dc4 diff --git a/autogen.sh b/autogen.sh index d0a2f3fee..4823fe715 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,18 +57,29 @@ args="$args \ " fi +cd $oldpwd + if [ "x$1" = "xc" ]; then - ./configure CFLAGS='-g -O0' --enable-kdbus $args + $topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args make clean elif [ "x$1" = "xg" ]; then - ./configure CFLAGS='-g -Og' --enable-kdbus $args + $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='-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 "./configure CFLAGS='-g -O0' --enable-kdbus $args" + echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-compat-libs --enable-kdbus $args" echo fi