How can I overcome the fact that I attend a weak undergraduate institution? I am currently a traditional sophomore math major at a large university in the southern USA. I'm interested in attending graduate school once I graduate, but my university has a weak math program, and I am afraid it will severely effect me in the future. 

For example, the department only routinely offers the most basic undergraduate courses, such as a two semester sequence of real analysis, one complex analysis class, basic topology, and algebra. Starting my junior year, I will be running out of math classes to take, and it will be hard to construct a schedule that makes me a full time student. By my senior year, directed studies will be my only option for classes. 

Some solutions I've thought of


Apply to math summer programs and other enrichment programs like REUs
Transfer to a different school
Get a relevant minor or double major


The problem with transferring is that my upper division math classes are not transferable to other schools in the state. I would have to retake every math class I've taken other than calculus, and it would take me at least 3 additional years at another school.

The only constructive advice I've received from faculty at my school is to graduate in three years. I do not like the idea of graduating early because I've simply exhausted the departments offerings. I also do not think a PhD admission committee would look favorably upon that.

What other courses of action should I look into?
It sounds like you have a good start on the most important thing: take advantage of every opportunity at your current program and excel at all of them. Even from a weak undergraduate program, if you can come out with multiple letters saying that you are the strongest student they've seen in X years and have the credentials to back that up, you'll have a good chance at solid graduate programs. 

Your situation means that standardized tests are also even more important. Math is nice because there actually exists a test (math subject GRE) that most schools put significant weight on, so make sure to take it very seriously. Doing well on the math GRE takes away a lot of the uncertainty that admissions committees will have about your application due to the institution.

Assuming that you don't transfer, some other options:


Get to know faculty and spend that extra time doing research. Proven research experience can make up for a lot of coursework, and you'll hopefully get a much stronger recommendation letter as well. This is important to do no matter what kind of institution you're at, but is probably extra important at weaker programs where your application can't rely on reputation and coursework.
Consider graduating early and getting a Master's degree at a strong program. This isn't always financially feasible, but if it is then it's an option to strengthen your coursework and resume. Availability of strong master's programs can depend on the field, but it's worth looking into.
Graduate early and get a job doing research. Again, availability may depend on field (I hear that these aren't common in math), but if you can get the right job it can be a great boon to a resume and help generate another good recommendation. Bonus points if you can find a job near a good university and take a couple classes on the side.