  We systematically develop Weyl-Titchmarsh theory for singular differential
operators on arbitrary intervals $(a,b) \subseteq \mathbb{R}$ associated with
rather general differential expressions of the type \[
  \tau f = \frac{1}{r} (- \big(p[f' + s f]\big)' + s p[f' + s f] + qf),] where
the coefficients $p$, $q$, $r$, $s$ are real-valued and Lebesgue measurable on
$(a,b)$, with $p\neq 0$, $r>0$ a.e.\ on $(a,b)$, and $p^{-1}$, $q$, $r$, $s \in
L^1_{\text{loc}}((a,b); dx)$, and $f$ is supposed to satisfy [f \in
AC_{\text{loc}}((a,b)), \; p[f' + s f] \in AC_{\text{loc}}((a,b)).] In
particular, this setup implies that $\tau$ permits a distributional potential
coefficient, including potentials in $H^{-1}_{\text{loc}}((a,b))$.
  We study maximal and minimal Sturm-Liouville operators, all self-adjoint
restrictions of the maximal operator $T_{\text{max}}$, or equivalently, all
self-adjoint extensions of the minimal operator $T_{\text{min}}$, all
self-adjoint boundary conditions (separated and coupled ones), and describe the
resolvent of any self-adjoint extension of $T_{\text{min}}$. In addition, we
characterize the principal object of this paper, the singular
Weyl-Titchmarsh-Kodaira $m$-function corresponding to any self-adjoint
extension with separated boundary conditions and derive the corresponding
spectral transformation, including a characterization of spectral
multiplicities and minimal supports of standard subsets of the spectrum. We
also deal with principal solutions and characterize the Friedrichs extension of
$T_{\text{min}}$.
  Finally, in the special case where $\tau$ is regular, we characterize the
Krein-von Neumann extension of $T_{\text{min}}$ and also characterize all
boundary conditions that lead to positivity preserving, equivalently,
improving, resolvents (and hence semigroups).
