summaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure b/configure
index 63151a0..8a17f2e 100755
--- a/configure
+++ b/configure
@@ -68,6 +68,7 @@ init_vars()
mb_cflags_os=$CFLAGS_OS
mb_cflags_site=$CFLAGS_SITE
mb_cflags_path=$CFLAGS_PATH
+ mb_cflags_strict=$CFLAGS_STRICT
mb_cflags_util=$CFLAGS_UTIL
mb_ldflags=$LDFLAGS
@@ -77,6 +78,7 @@ init_vars()
mb_ldflags_config=$LDFLAGS_CONFIG
mb_ldflags_sysroot=$LDFLAGS_SYSROOT
mb_ldflags_path=$LDFLAGS_PATH
+ mb_ldflags_strict=$LDFLAGS_STRICT
mb_ldflags_util=$LDFLAGS_UTIL
mb_pe_subsystem=$PE_SUBSYSTEM
@@ -153,6 +155,7 @@ common_defaults()
[ -z "$mb_cflags_os" ] && mb_cflags_os=$mb_default_cflags_os
[ -z "$mb_cflags_site" ] && mb_cflags_site=$mb_default_cflags_site
[ -z "$mb_cflags_path" ] && mb_cflags_path=$mb_default_cflags_path
+ [ -z "$mb_cflags_strict" ] && mb_cflags_strict=$mb_default_cflags_strict
[ -z "$mb_cflags_util" ] && mb_cflags_util=$mb_default_cflags_util
[ -z "$mb_ldflags_debug" ] && mb_ldflags_debug=$mb_default_ldflags_debug
@@ -161,6 +164,7 @@ common_defaults()
[ -z "$mb_ldflags_config" ] && mb_ldflags_config=$mb_default_ldflags_config
[ -z "$mb_ldflags_sysroot" ] && mb_ldflags_sysroot=$mb_default_ldflags_sysroot
[ -z "$mb_ldflags_path" ] && mb_ldflags_path=$mb_default_ldflags_path
+ [ -z "$mb_ldflags_strict" ] && mb_ldflags_strict=$mb_default_ldflags_strict
[ -z "$mb_ldflags_util" ] && mb_ldflags_util=$mb_default_ldflags_util
[ -z "$mb_pe_subsystem" ] && mb_pe_subsystem=$mb_default_pe_subsystem
@@ -331,6 +335,16 @@ config_flags()
mb_ldflags="$mb_ldflags_libs"
mb_ldflags_util="$mb_ldflags_util -static"
fi
+
+ # ccstrict
+ if [ "$mb_ccstrict" = 'yes' ]; then
+ mb_cflags_strict='-Wall -Werror -Wextra -Wundef'
+ fi
+
+ # ldstrict
+ if [ "$mb_ldstrict" = 'yes' ]; then
+ mb_ldflags_strict='-Wl,--no-undefined'
+ fi
}
@@ -360,6 +374,7 @@ config_copy()
-e 's^@cflags_os@^'"$mb_cflags_os"'^g' \
-e 's^@cflags_site@^'"$mb_cflags_site"'^g' \
-e 's^@cflags_path@^'"$mb_cflags_path"'^g' \
+ -e 's^@cflags_strict@^'"$mb_cflags_strict"'^g' \
-e 's^@cflags_util@^'"$mb_cflags_util"'^g' \
\
-e 's^@ldflags@^'"$mb_ldflags"'^g' \
@@ -369,6 +384,7 @@ config_copy()
-e 's^@ldflags_config@^'"$mb_ldflags_config"'^g' \
-e 's^@ldflags_sysroot@^'"$mb_ldflags_sysroot"'^g' \
-e 's^@ldflags_path@^'"$mb_ldflags_path"'^g' \
+ -e 's^@ldflags_strict@^'"$mb_ldflags_strict"'^g' \
-e 's^@ldflags_util@^'"$mb_ldflags_util"'^g' \
\
-e 's^@pe_subsystem@^'"$mb_pe_subsystem"'^g' \
@@ -533,6 +549,18 @@ for arg ; do
mb_disable_shared='no'
;;
+ # convenience
+ --strict)
+ mb_ccstrict='yes'
+ mb_ldstrict='yes'
+ ;;
+ --ccstrict)
+ mb_ccstrict='yes'
+ ;;
+ --ldstrict)
+ mb_ldstrict='yes'
+ ;;
+
# project
--nickname=*)
mb_nickname=${arg#*=}