By the time the attack on Pearl Harbor happened, the United States had deciphered the Japanese diplomatic code that was called "Magic," and knew an attack was coming, but did not know where it was coming. It was expected in the Philippines, the Panama Canal, or Pearl Harbor. Each of these should have been warned to expect a possible attack.
Roosevelt wanted to get the United States into World War II. He knew that the best way to get the U.S. into the war was to provoke Germany or Japan into hitting first. It was in his interest for the Japanese to hit Pearl Harbor. It was not in his interest for the attack to be so devastating to the Pacific Fleet as it was. If the base at Pearl Harbor had been warned, fewer ships would have been destroyed, and the U.S. counter attack would have been stronger sooner.