  We study the nature of phase transitions in a self-gravitating classical gas
in the presence of a central body. The central body can mimic a black hole at
the center of a galaxy or a rocky core (protoplanet) in the context of
planetary formation. In the chemotaxis of bacterial populations, sharing formal
analogies with self-gravitating systems, the central body can be a supply of
``food'' (chemoattractant). We consider both microcanonical (fixed energy) and
canonical (fixed temperature) descriptions and study the inequivalence of
statistical ensembles. At high energies (resp. high temperatures), the system
is in a ``gaseous'' phase and at low energies (resp. low temperatures) it is in
a condensed phase with a ``cusp-halo'' structure, where the cusp corresponds to
the rapid increase of the density of the gas at the contact with the central
body. For a fixed density $\rho_{*}$ of the central body, we show the existence
of two critical points in the phase diagram, one in each ensemble, depending on
the core radius $R_{*}$: for small radii $R_{*}<R_{*}^{\rm MCP}$, there exist
both microcanonical and canonical phase transitions (that are zeroth and first
order); for intermediate radii $R_{*}^{\rm MCP}<R_{*}<R_{*}^{\rm CCP}$, only
canonical phase transitions are present; and for large radii $R_{*}>R_{*}^{\rm
CCP}$, there is no phase transition at all. We study how the nature of these
phase transitions changes as a function of the dimension of space. We also
discuss the analogies and the differences with phase transitions in the
self-gravitating Fermi gas [P.H. Chavanis, Phys. Rev. E 65, 056123 (2002)].
