Comparing a current is typically done with a current sense resistor. A VERY low value resistor that develops only a slight voltage, often fed through an amplifier into a voltage comparator. The voltage is directly proportional to the current in the sense resistor as long as the power is very low in relation to the size of the sense resistor. Suggestions on how to make a circuit that would work for you would require information about the amount of current you need to source, and at what voltage. There's a big difference on how you value a sense resistor and circuitry for 1ma 10ma, 100ma, 1amp, 10amps, 100amps etc... Purchasing appropriate shunts and having them calibratied can allow you to measure any practical current level.