From cf1a49ca97c3654c6b3cef31724bff9c5ff3ba36 Mon Sep 17 00:00:00 2001 From: midipix Date: Sun, 25 Apr 2021 12:10:15 +0000 Subject: project: cfgdefs_bootstrap(): integrate with cfgdefs_perform_common_tests(). --- project/config/cfgdefs.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'project') 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 } -- cgit v1.2.3