E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
You may whistle for that. You must not expect it. The reference is to sailors whistling for the wind. They call the winds, but will they come when they do call them?
Only a little hour ago
I was whistling to St. Antonio
For a capful of wind to fill our sail,
And instead of a breeze he has sent a gale.
Longfellow: Golden Legend, v.
You must whistle for more. In the old whistle-tankards, the whistle comes into play when the tankard is empty, to announce to the drawer that more liquor is wanted. Hence the expression, If a man wants liquor, he must whistle for it.