This question/answer will eventually serve as complete answer for this question: How can I manipulate/rotate a JPEG image in C++? Since the answers given to that question are on
Your advice for updating the jconfig.h file to #define HAVE_PROTOTYPES 1
is only a band-aid solution for a deeper problem: jconfig.h is corrupted and has incorrect #undef
for many important items your compiler supports.
The proper way to work around this is to follow the install.txt advice to manually compile ckconfig.c and have it generate a jconfig.h for you, then proceed to make, and make install.