Subject: bug#20124: Building emacs and libjpeg not found on Fedora 22

From: Paul Eggert <[email-masked]>
Date: Tue, 17 Mar 2015 23:41:34 -0700

I guess the following part of the 'configure' script isn't working as expected:

if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :

The call to $EGREP is failing, so the 'then' part doesn't execute.  $EGREP 
should succeed here.  Please try to figure that out, e.g., by replacing the 
above with something like the following:

echo "$ac_cpp conftest.$ac_ext" >test1.out
echo "$EGREP 'version= *(6[2-9]|[7-9][0-9])'" >test2.out
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | tee test3.out |
   $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :

and then re-run ./configure and inspect test1.out, test2.out, test3.out to see 
if they can help you figure out why $EGREP is failing here.