diff options
author | midipix <writeonce@midipix.org> | 2016-05-06 07:01:01 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-11-10 23:35:46 -0500 |
commit | 25984f85c31120e0f99c00a8e5938b9a8d77478c (patch) | |
tree | ae3ffbef665b60d670b217c2bd24435ae9533332 /configure | |
parent | 09d985e043a61686835f5659797d9f49e3a89516 (diff) | |
download | perk-25984f85c31120e0f99c00a8e5938b9a8d77478c.tar.bz2 perk-25984f85c31120e0f99c00a8e5938b9a8d77478c.tar.xz |
build system: configure: added config_support()
* test supported features as needed.
- shared library support.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -405,6 +405,27 @@ config_copy() } +config_support() +{ + [ "$mb_disable_shared" = 'yes' ] && return 0 + + mbt_cc=`make .display-cc` + mbt_cflags=`make .display-cflags` + mbt_source='int foo(int x){return ++x;}' + mbt_result='no' + + rm -f a.out + echo "$mbt_source" | "$mbt_cc" -shared -o a.out -xc - + stat a.out >/dev/null 2>&1 && mbt_result='yes' + rm -f a.out + + if [ "$mbt_result" = 'no' ]; then + mb_disable_shared='yes' + config_copy + fi +} + + config_host() { make -s host.tag && return 0 @@ -536,6 +557,7 @@ cross_defaults # four: config config_flags config_copy +config_support config_host config_status |