Red-Hat-based systems such as Fedora, CentOS, and Scientific Linux will already have Pacemaker in their repositories. Debian and its derivatives such as Ubuntu also include Pacemaker as an optional install from standard repositories. Red Hat Enterprise Linux (RHEL) itself, however, only offers the software as a paid add-on, available at this URL:
https://www.redhat.com/apps/store/add-ons/
Whatever choice you make, it shouldn't be necessary to compile Pacemaker from source on most Linux distributions.