Ok, from the code I understood that the computed polynomials (Legendre, Chebyshev, Jacobi etc.) are in fact orthonormal and not only orthogonal w.r.t. a certain weight.
So were the legendre polynomials constructed using the uniform weight of 0.5 and chebyshev with 1/pi*(1-x^2)^-0.5? How can we extract the resulting polynomial coefficients?