Use AM_CONFIG_HEADERS, not AM_CONFIG_HEADER. The latter is deprecated and no longer valid on current Macports autoconf.
Update ax_check_gl to 2.7.
Fix OpenGL header include for OSX.