--- loncom/homework/caparesponse/commands 2002/05/04 17:57:01 1.12 +++ loncom/homework/caparesponse/commands 2015/04/05 16:47:27 1.15 @@ -42,8 +42,19 @@ make ARCH=LONCAPA libcapa cd $path cp $CAPADIR/pProj/LONCAPA/*.o capaFunctions swig -perl5 capa.i +dist=`perl ../../build/distprobe` +if [[ $dist == "redhat8" || $dist == "redhat9" ]] +then + cat capa_wrap.c | perl -pe '$_=~s-SWIGEXPORT\(void,boot_capa\)\(CV\* cv\)\;-SWIGEXPORT\(void,boot_capa\)\(pTHX_ CV\* cv\)\;-;' > capa_wrap.c.new + mv capa_wrap.c.new capa_wrap.c +fi cp Makefile.PL Makefile.pl perl Makefile.PL make -f Makefile cp blib/arch/auto/capa/capa.so . -perl capa.pm +perl capa.pm +swigver=`swig -version | perl -ne 'print $1 if /SWIG Version (\d+)\./i'` +if [[ $swigver > 2 ]] +then + echo -n "" > capa.bs +fi