iphone compilation problems

The libraries and include paths are specified in Config.pp:

// Is OpenGL ES 1.x installed, and where? This is a minimal subset of
// OpenGL for mobile devices.
#define GLES_IPATH
#define GLES_LPATH
#define GLES_LIBS GLES_cm
#defer HAVE_GLES $[libtest $[GLES_LPATH],$[GLES_LIBS]]

// OpenGL ES 2.x is a version of OpenGL ES but without fixed-function
// pipeline - everything is programmable there.
#define GLES2_IPATH
#define GLES2_LPATH
#define GLES2_LIBS GLESv2
#defer HAVE_GLES2 $[libtest $[GLES2_LPATH],$[GLES2_LIBS]]

As for specifying the framework, you can simply override the GLES_LIBS to the empty string, override HAVE_GLES to be 1 and add this line in panda/src/glesgsg/:

#define OSX_SYS_FRAMEWORKS OpenGLES

And repeat the process similarly for GLES2 / gles2gsg.

But make sure you don’t mix-and-match OpenGL ES with OpenGL ES 2. Unless the same framework handles both OpenGL ES and OpenGL ES 2?
Is there an OpenGLES2 framework?

Anyway, this is all just guesswork, so I could be totally wrong.