With the use-case you've now added:
case $5 in
(C | C++)
export CXXFLAGS="${CXXFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
esac
case $5 in
(C) export CFLAGS="${CFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}";;
(C++) ;;
(*) export FLAGS_USER="${FLAGS_USER} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
esac
Or:
c_or_cxx=false
case $5 in
(C) export CFLAGS="${CFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
c_or_cxx=true;;
(C++) c_or_cxx=true;;
(*) export FLAGS_USER="${FLAGS_USER} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
esac
if "$c_or_cxx"; then
export CXXFLAGS="${CXXFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
fi
You can also include the common code in a function or variable to eval (variable may be preferable here as the code includes references to $1):
for_c_and_cxx='
export CXXFLAGS="${CXXFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
'
case $5 in
(C)
export CFLAGS="${CFLAGS} ${1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
eval "$for_c_and_cxx";;
(C++)
eval "$for_c_and_cxx";;
(*)
export FLAGS_USER="${FLAGS_USER} {1}${SUSUWU_DEPENDENCY_INCLUDE_PATH}"
esac
Note that it's only the Bourne shell that required you omitted the opening (s (the Bourne shell also did not support export var=value and in any case was not a POSIX compliant shell). In modern/standard sh implementations, you can include it which IMO makes for more readable code and lets you use your editors ability to check for matching parenthesis for instance.