diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/config/cfgdefs.sh | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh index 22b94c3..3b6aa29 100644 --- a/project/config/cfgdefs.sh +++ b/project/config/cfgdefs.sh @@ -42,8 +42,7 @@ cfgdefs_bootstrap() cfgdefs_cflags="-I${mb_source_dir}/src/internal" cfgdefs_cflags="$cfgdefs_cflags -D_PATH_DEFSYSPATH=\"${mb_source_dir}/mk\"" - cfgdefs_cflags="$cfgdefs_cflags -DHAVE_STRERROR -DHAVE_VSNPRINTF" - cfgdefs_cflags="$cfgdefs_cflags -DHAVE_SETPGID -DHAVE_SETRLIMIT -DHAVE_SETENV" + cfgdefs_cflags="$cfgdefs_cflags $cfgdefs_added_defs" cfgdefs_make="$mb_pwd/bootstrap/make" @@ -108,22 +107,45 @@ cfgdefs_perform_utility_tests() cfgdefs_perform_common_tests() { + # bootstrap + cfgdefs_added_defs= + # interfaces mb_cfgtest_headers='stdio.h' cfgtest_interface_presence 'vsnprintf' + if [ $? = '0' ]; then + cfgdefs_added_defs="$cfgdefs_added_defs -DHAVE_VSNPRINTF" + fi + mb_cfgtest_headers='string.h' cfgtest_interface_presence 'strerror' + if [ $? = '0' ]; then + cfgdefs_added_defs="$cfgdefs_added_defs -DHAVE_STRERROR" + fi + mb_cfgtest_headers='sys/types.h unistd.h' cfgtest_interface_presence 'setpgid' + if [ $? = '0' ]; then + cfgdefs_added_defs="$cfgdefs_added_defs -DHAVE_SETPGID" + fi + mb_cfgtest_headers='sys/time.h sys/resource.h' cfgtest_interface_presence 'setrlimit' + if [ $? = '0' ]; then + cfgdefs_added_defs="$cfgdefs_added_defs -DHAVE_SETRLIMIT" + fi + mb_cfgtest_headers='stdlib.h' cfgtest_interface_presence 'setenv' + if [ $? = '0' ]; then + cfgdefs_added_defs="$cfgdefs_added_defs -DHAVE_SETENV" + fi + cfgtest_newline } |