How to compile motion software for webcam


We are trying to compile the motion software (for webcam) to our
beagle board xm. We are using the kernel

motion version is 3.2.9
In make file we have changed the cc = arm-none-linux-gnueabi-gcc

in CFLAGS march = armv7

now we have done make.

We got following error

../arm-none-linux-gnueabi/bin/ld : cannot find -ljpeg
collect2: ld returned 1 exit status
make : *** [motion] Error 1

Could any one please help here

Aditya B