summaryrefslogtreecommitdiff
path: root/project/config
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-04-25 12:10:15 +0000
committermidipix <writeonce@midipix.org>2021-04-25 12:14:42 +0000
commitcf1a49ca97c3654c6b3cef31724bff9c5ff3ba36 (patch)
tree4333ee75a65baeeb3f437d598fe7cf34c5e588dd /project/config
parentdbacce68e21596226cc84c19185662fb80004636 (diff)
downloadsbmake-cf1a49ca97c3654c6b3cef31724bff9c5ff3ba36.tar.bz2
sbmake-cf1a49ca97c3654c6b3cef31724bff9c5ff3ba36.tar.xz
project: cfgdefs_bootstrap(): integrate with cfgdefs_perform_common_tests().
Diffstat (limited to 'project/config')
-rw-r--r--project/config/cfgdefs.sh26
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
}