According to John's account (12:13), the shouting appears to have originated with those who came out from Jerusalem. Thus, it seems clear that Jesus' apostles did not incite the crowds to shout these statements of praise.
Luke 19:39,40 reads - "And some of the Pharisees called to Him from the crowd, 'Teacher, rebuke Your disciples.' But He answered and said to them, 'I tell you that if these should keep silent, the stones would immediately cry out.'" Some of the Pharisees cry out to Jesus to stop those who were making such bold statements to Him. Perhaps there were some who genuinely feared the vengeance of the Romans (cf. John 11:48), but it seems more likely that their words here are strictly motivated by jealousy.
"I tell you that if these should keep silent, the stones would immediately cry out" - This should probably not be interpreted literally, though certainly stones could cry out if God so desired. Jesus' point here is that praise should not be withheld on this exceedingly special occasion (i.e., the great King's visit to His city; cf. Matt. 5:35). Even inanimate objects "knew" the importance of that day and would give verbal praise (if necessary). Certainly man should do likewise.
"Now as He drew near, He saw the city and wept over it, saying, 'If you had known, even you, especially in this your day, the things that make for your peace! But now they are hidden from your eyes. For days will come upon you when your enemies will build an embankment around you, surround you and close you in on every side, and level you, and your children within you, to the ground; and they will not leave in you one stone upon another, because you did not know the time of your visitation" (Luke 19:41-44).
Jesus audibly sobbed and lamented over the city. The wording does not indicate that He just silently shed a few tears. As He approached Jerusalem from the elevation of the Mount of Olives, He would have had a great view of the city. As He looked upon it, He was deeply grieved as He realized the difference between what His coming might have meant to it and what it actually did mean. He came out of love and desired to bring peace and blessings to Jerusalem, but He knew that their hatred, violence, and rejection of Him would lead to judgment and destruction.
They were blind (as a people) to the truth about Jesus. If they had only fully accepted Him (and not just in an emotional sense as they were currently doing), then He would have spared them their eventual destruction. Although the people were rejoicing in the hope of physical triumph, Jesus was weeping over their approaching desolation.
"For days will come upon you when your enemies will build an embankment around you, surround you, and close you in on every side" (Luke 19:43). Jesus here prophetically describes the demise that would come upon Jerusalem. In A.D. 70, the Roman military, directed by General Titus, would surround the great city and choke the life out of her (cf. Luke 21:20-24). The city would be leveled, literally, as predicted by Jesus. Had the people understood that now was their time of "visitation" (i.e., season of grace; e.g., Exo. 4:31), they would have fully submitted to Christ and spared themselves (as the children of Jerusalem) much suffering and anguish (cf. Matt. 24:21).
We will conclude our study of this narrative in our next lesson.