--- sqlite-autoconf-3080400/lemon/lemon.c 2014-03-10 22:34:43.000000000 +0200 +++ sqlite-autoconf-3080400.new/lemon/lemon.c 2014-03-10 22:34:14.000000000 +0200 @@ -3245,6 +3245,10 @@ tpltname = pathsearch(lemp->argv0,templatename,0); } if( tpltname==0 ){ + sprintf(buf,"/usr/share/lemon/%s",templatename); + tpltname = buf; + } + if( tpltname==0 ){ fprintf(stderr,"Can't find the parser driver template file \"%s\".\n", templatename); lemp->errorcnt++; @@ -3252,9 +3256,14 @@ } in = fopen(tpltname,"rb"); if( in==0 ){ - fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); - lemp->errorcnt++; - return 0; + sprintf(buf,"/usr/share/lemon/%s",templatename); + tpltname = buf; + in = fopen(tpltname,"rb"); + if( in==0 ){ + fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); + lemp->errorcnt++; + return 0; + } } return in; }