[giflib] Set LIBVER and LIBMAJOR when installing (#25173)
[giflib] Set LIBVER and LIBMAJOR when installing (#25173)

* Set LIBVER and LIBMAJOR

* Typo fix

* Fix 2

* Fix #3
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack