I don't use Allegro, but I went digging and found what might be the answer to your questions. Apparently, if you run 'allegro-config' on the command line, it will show you the compiler/linker flags you need. You can just copy those into your Geany project settings.