I don't think you can determine that directly. You'll have to infer it from the model information you can get back from sysctlbyname (see the iOS man pages). For example:
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
will give you back a string like "iPhone3,1" which has a retina display, or "iPhone 2,1" which hasn't.