Using ${x%%y} substitutions is not portable: in particular it is
not supported by Solaris /bin/sh (or heirloom-sh). Let's use a
more portable construct instead.
# Ensure that if "la_CC"-style code is requested then so is plain "la".
printf '%s\n' "$arg"
case $arg in
# Ensure that if "la_CC"-style code is requested then so is plain "la".
printf '%s\n' "$arg"
case $arg in
- *_*) printf '%s\n' "${arg%%_*}" ;;
+ *_*)
+ save_IFS=$IFS; IFS=_
+ set x $arg
+ IFS=$save_IFS
+ AS_ECHO(["${2}"])
+ ;;
esac
done
} | sort -u >conftest.ena
esac
done
} | sort -u >conftest.ena