I'm not a lawyer, but these are my thoughts, which may not be accurate.
If you're employed by the company you're building the software for, and will only be using it internally, you are not required to release your changes or your source code.
source:
http://www.gnu.org/licenses/gpl-faq.html#GPLRequireSourcePostedPublic
From what I can tell, if you're selling it to a third party company, you must release the source code to the modifications you made and any required libraries and code needed to compile it to that company. That company can in turn distribute the software under the gpl for any gpl'd libraries/code.
http://www.gnu.org/licenses/gpl-faq.html#DoesTheGPLAllowDownloadFee
Quote: "If I add a module to a GPL-covered program, do I have to use the GPL as the license for my module?
The GPL says that the whole combined program has to be released under the GPL. So your module has to be available for use under the GPL.
But you can give additional permission for the use of your code. You can, if you wish, release your program under a license which is more lax than the GPL but compatible with the GPL. The license list page gives a partial list of GPL-compatible licenses.
If a library is released under the GPL (not the LGPL), does that mean that any program which uses it has to be under the GPL or a GPL-compatible license?
Yes, because the program as it is actually run includes the library."
Quote: "Can I release a non-free program that's designed to load a GPL-covered plug-in?
It depends on how the program invokes its plug-ins. For instance, if the program uses only simple fork and exec to invoke and communicate with plug-ins, then the plug-ins are separate programs, so the license of the plug-in makes no requirements about the main program.
If the program dynamically links plug-ins, and they make function calls to each other and share data structures, we believe they form a single program, which must be treated as an extension of both the main program and the plug-ins. In order to use the GPL-covered plug-ins, the main program must be released under the GPL or a GPL-compatible free software license, and that the terms of the GPL must be followed when the main program is distributed for use with these plug-ins.
If the program dynamically links plug-ins, but the communication between them is limited to invoking the ‘main’ function of the plug-in with some options and waiting for it to return, that is a borderline case.
Using shared memory to communicate with complex data structures is pretty much equivalent to dynamic linking."
From what I can tell, if your program communicates with the library as stated above, you don't have to release your main program under the GPL.
For distribution, if you sell your program and don't dynamically link the library so your main program is not gpl'd, you have to release the source code for the modifications you made to the library. It has to be compilable as-is. The reason for this is that it should be easy for the user to recompile or update the library and use it in the main software or other software.
Lastly, if you decide you have to GPL your entire program: if you work for the company and plan to use it in-house only, great, you can and don't have to release the program. You may have the right to release it later regardless of what the company wants, unless you signed otherwise. See:
Quote: "
Does the GPL allow me to distribute a modified or beta version under a nondisclosure agreement?
No. The GPL says that your modified versions must carry all the freedoms stated in the GPL. Thus, anyone who receives a copy of your version from you has the right to redistribute copies (modified or not) of that version. You may not distribute any version of the work on a more restrictive basis. "
Quote: "
Does the GPL allow me to develop a modified version under a nondisclosure agreement?
Yes. For instance, you can accept a contract to develop changes and agree not to release your changes until the client says ok. This is permitted because in this case no GPL-covered code is being distributed under an NDA.
You can also release your changes to the client under the GPL, but agree not to release them to anyone else unless the client says ok. In this case, too, no GPL-covered code is being distributed under an NDA, or under any additional restrictions.
The GPL would give the client the right to redistribute your version. In this scenario, the client will probably choose not to exercise that right, but does have the right. "