I managed to use this nice GLM library to replace glOrtho(),
gluPerspective() and gluLookAt() to create the matrices for
the deprecated shader uniforms gl_*Matrix.
What’s left is to create gl_NormalMatrix.
I already know it must be the transpose of the inverse
of the upper left 3x3 part of the gl_ModelViewMatrix.
You could also simply use simply the model-view matrix if you do only orthogonal transformations (i.e. translation and rotation). This is so because the inverse of an orthogonal matrix is its transpose, so the inverse-transpose is the original matrix itself. This way you can save quite some work as calculating the inverse of a matrix is a pretty expensive operation.