Heat the oil in a saucepan or in a small, deep skillet, and add the garlic. Cook briefly without browning and add the basil, oregano, tomatoes, parsley and the red pepper flakes.
Add pepper to taste and bring to a boil. Cook about 30 minutes. Add the olives and capers. Chop the anchovies and add to the sauce. Add the clams. Cover and cook for about 30 more minutes.
Serve over spaghetti cooked according to package directions.