.
From the first glance to the problem, the answer is obvious:
The necessary and sufficient condition is proportionality of the pairs (a,b) and (c,d).
To get a formal proof, you can take the derivative of the function.
The numerator of the derivative function then is
a*(cx + d) - (ax + b)*c = (ac - ac)*x + ad - bc = ad - bc.
The function (the original rational function / (fraction) ) is a constant if and only if the numerator of the derivative is identically zero,
which leads to the equality ad - bc = 0.
In turn, it means that ad = bc, or, equivalently, = .
It is precisely the same condition as proportionality of the pairs (a,b) and (c,d).
Solved and answered.