We present optical and near-infrared UBVRIJHK photometry of stars in the Galactic globular cluster M4 (NGC 6121) based upon a large corpus of observations obtained mainly from public astronomical archives. We concentrate on the RR Lyrae variable stars in the cluster, and make a particular effort to accurately reidentify the previously discovered variables. We have also discovered two new probable RR Lyrae variables in the M4 field: one of them by its position on the sky and its photometric properties is a probable member of the cluster, and the second is a probable background (bulge?) object. We provide accurate equatorial coordinates for all 47 stars identified as RR Lyraes, new photometric measurements for 46 of them, and new period estimates for 45. We have also derived accurate positions and mean photometry for 34 more stars previously identified as variable stars of other types, and for an additional five non-RR Lyrae variable stars identified for the first time here. We present optical and near-infrared color-magnitude diagrams for the cluster and show the locations of the variable stars in them. We present the Bailey (period-amplitude) diagrams and the period-frequency histogram for the RR Lyrae stars in M4 and compare them to the corresponding diagrams for M5 (NGC 5904). We conclude that the RR Lyrae populations in the two clusters are quite similar in all the relevant properties that we have considered. The mean periods, pulsation-mode ratios, and Bailey diagrams of these two clusters show support for the recently proposed Oosterhoff-neutral classification.