In configure, run sed on R/geoid.R to set the value of HAVE_GEOGRAPHICLIB.