In the paper "Ergodic optimization" by Oliver Jenkinson, Proposition 2.1 says (among other things):
Let $T:X\to X$ be a continuous map on a compact metric space. If $f:X\to\mathbb{R}$ is either continuous, or the characteristic function of a closed subset, then
$$\sup_{\mu\in\mathcal{M}_{T}}\int fd\mu = \limsup_{n\to\infty}\frac{1}{n}\sup_{x\in X}S_{n}f(x).$$
Here $\mathcal{M}_{T}$ is the collection of Borel probability measures invariant under $T$ in $X$, and $S_{n}f := \sum_{i=0}^{n-1} f\circ T^{i}$.
I want to prove that
$$\sup_{\mu\in\mathcal{M}_{T}}\int fd\mu \geq \limsup_{n\to\infty}\frac{1}{n}\sup_{x\in X}S_{n}f(x)$$
to understand the proof. My doubt is:
Why do you have an accumulation point $\mu$ with respect to the weak-$\ast$ topology? Is it some usual property of compact metric spaces? If you could give me some reference to read about it I would appreciate it very much?
The proof in the paper: Compactness of $X$ means that the set $\mathcal{M}$ of Borel probability measures on $X$ is compact with respect to the weak-$\ast$ topology. If
$$\mu_{n} := \frac{1}{n}\sum_{i=0}^{n-1}\delta_{T^{i}x_{n}},$$
where $x_{n}$ is such that
$$\max_{x\in X}\frac{1}{n}S_{n}f(x) = \frac{1}{n}S_{n}f(x_{n}) = \int fd\mu_{n},$$
then the sequence $(\mu_{n})$ has a weak-$\ast$ accumulation point $\mu$. It is easy to see that in fact $\mu\in\mathcal{M}_{T}$.
Without loss of generality we shall suppose that $\mu_{n}\to\mu$ in the weak-$\ast$ topology. If $f$ is continuous, this means that
$$\lim_{n\to\infty}\int fd\mu_{n} = \int fd\mu \leq \sup_{\mu\in\mathcal{M}}\int fd\mu.$$
For a metric space $X$, $X$ is compact iff the set $\operatorname{Prob}(X)$ of Borel probability measures endowed with vague topology (= weakstar topology) is a compact metric space, whence compactness (w/r/t vague topology) implies sequential compactness (In a metric space, compact implies sequentially compact), that is, any sequence of Borel probability measures will be convergent to some Borel probability measure up to taking a subsequence.
Apart from the many discussions here on M.SE two books that might be useful are Parthasarathy's Probability Measures On Metric Spaces and Einsiedler & Ward's Ergodic Theory - With A View Towards Number Theory; Walters' Introduction to Ergodic Theory ought to record these matters too (or any other introductory ergodic theory book for that matter).