I don't think that the task of supporting our library is to teach anyone the linking options in their system.
If both the shared and static libraries are in the same directory, which you pass to the linker via the -L option, then it is not surprising that it chooses the shared one from the two possible libraries. Perhaps your linker has an option "choose from two - the static version" but again I don't think that the LibRaw forum is the right place to discuss macOS's ld options.
Other possible solutions (besides of linker option 'prefer static') are to move the static version to a separate directory or, conversely, remove the dynamic one from the directory passed to the linker. Also, configure can only create a static library without a dynamic one (again, I hope that we will not discuss configure options in our forum)
Regarding your second question (which I already answered above): you've build LibRaw with JPEG decompression support, you need to add libjpeg to your application linking input (since you say that the examples build successfully: configure/libtool already do that)
I don't think that the task of supporting our library is to teach anyone the linking options in their system.
If both the shared and static libraries are in the same directory, which you pass to the linker via the -L option, then it is not surprising that it chooses the shared one from the two possible libraries. Perhaps your linker has an option "choose from two - the static version" but again I don't think that the LibRaw forum is the right place to discuss macOS's ld options.
Other possible solutions (besides of linker option 'prefer static') are to move the static version to a separate directory or, conversely, remove the dynamic one from the directory passed to the linker. Also, configure can only create a static library without a dynamic one (again, I hope that we will not discuss configure options in our forum)
Regarding your second question (which I already answered above): you've build LibRaw with JPEG decompression support, you need to add libjpeg to your application linking input (since you say that the examples build successfully: configure/libtool already do that)