btrfs-progs: check for programs in ./configure

Signed-off-by: Karel Zak <kzak@redhat.com>
btrfs-progs: fix ./configure lzo2 detection

Signed-off-by: Karel Zak <kzak@redhat.com>
btrfs-progs: use paths and $*_LIBS from ./configure

Signed-off-by: Karel Zak <kzak@redhat.com>
btrfs-progs: fix lzo2 stuff in ./configure.ac

Signed-off-by: Karel Zak <kzak@redhat.com>
btrfs-progs: cleanup compilation flags usage

- define basic default CFLAGS in configure.ac, because:

   * autoconf default is -g -O2, but btrfs uses -g -O1

   * it's better to follow autoconf; standard way to modify
     CFLAGS is to call:  CFLAGS="foo bar" ./configure

- move all flags to one place in Makefile.in

- don't use AM_CFLAGS, the CFLAGS and STATIC_CFLAGS are enough

- don't mix objects and flags in $LIBS, it's more readable to
  add $(libs) to make rules

Signed-off-by: Karel Zak <kzak@redhat.com>
btrfs-progs: clean generated files, make version.h stuff more robust

- add rule to generated version.h when any relevant stuff changed
- add rule to clean generated files on "make clean-all"

Signed-off-by: Karel Zak <kzak@redhat.com>