def METHOD_NAME(target, source, env, for_signature):
    """Function to determine what to use for SOVERSION"""
    if "SOVERSION" in env:
        return ".$SOVERSION"
    elif "SHLIBVERSION" in env:
        shlibversion = env.subst("$SHLIBVERSION")
        # We use only the most significant digit of SHLIBVERSION
        return "." + shlibversion.split(".")[0]
    else:
        return ""