How to rename libusb dynamic library files in Mac OSX to force it to be a static link?

Viewed 597

I am currently trying to install a card reader package CCID and the configure file has something like the following:

# use libusb-1.0
LIBUSB_DIR=$(pkg-config --variable=libdir libusb-1.0)

if ls "$LIBUSB_DIR"/*.dylib 2> /dev/null
then
    echo -en $RED
    echo "*****************************"
    echo "Dynamic library libusb found in $LIBUSB_DIR"
    echo "*****************************"
    echo -en $NORMAL
    echo "Rename it to force a static link"
    exit -1
fi

It is complaining that my libusb files are dynamic. How exactly can I rename them to force a static link? These are the files inside /usr/local/Cellar/libusb/1.0.22/lib:

enter image description here

1 Answers

Change the name "libusb-1.0.0.dylib" to "libusb-1.0.0.lib"

Change the name "libusb-1.0.dylib" to "libusb-1.0.lib"

and you can work now. If not, make sure

"libusb-1.0.0.lib -> Get info -> Name & Extension is libusb-1.0.0.lib"
"libusb-1.0.lib -> Get info -> Name & Extension is libusb-1.0.lib"
Related