package/autotools: add --{enable,disable}-{shared,static} automatically

For target packages, depending on BR2_PREFER_STATIC_LIB, add the
correct combination of --{enable,disable}-{shared,static} flags to
./configure calls.

  * When BR2_PREFER_STATIC_LIB is enabled, we pass --enable-static
  --disable-shared.

  * When BR2_PREFER_STATIC_LIB is disabled, we pass --enable-static
  --enable-shared. We enable static libraries since they can still be
  useful to statically link applications against some libraries
  (sometimes it is useful for size reasons). Static libraries are
  anyway only installed in the STAGING_DIR, so it doesn't increase in
  any way the size of the TARGET_DIR.

For host packages, always pass --enable-shared and --disable-static.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2 files changed