Update I would really appreciate if people who want to downmod my answer to post a comment with where exactly I am wrong. I'd love to learn more about the various licenses out there. Thanks in advance.
Update 2 Edited the GPL and OpenSource sections to remove any wording that can be construed to be subjective.
Get a lawyer to look at the actual license of the 'free' software library and tell you if you can distribute it and what conditions it imposes on any derivative works.
Here's my understanding of the various types of license. Keep in mind that I am not a lawyer; nor am I very actively involved with free/open source community, so I might be wrong about some of these.
GPL requires that any product that incorporates a GPL-licensed source to be also GPL-licensed, if it's distributed to third parties. GPL gives a lot of freedom to what the users can do with the licensed product, but limits the terms of distribution and licensing model for any derivative works that include parts or the whole GPLed product.
In particular, paragraph 2 of GPL v2 (the most widely used GPL revision), states that any derivative work must be also licensed under the terms of GPL v2 if distributed. Exact verbiage: "...any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof... to be licensed as a whole at no charge to all third parties under the terms of this License" (http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt)
There's also LGPL, which allows for linking to libraries under it without requiring the linked product to be GPL/LGPL-ed as well, though only in certain scenarios.
There are other OpenSource licenses, which give you the right to look at, modify or reuse the source code and/or create derivative works without imposing requirements on the licensing of the end product.
A Freeware license is a license that gives you the right to redistribute the software; however, you are not allowed to charge and make profit from it, except some minimal charge to recuperate the costs of the distribution (the CD cost for example). Freeware is not necessarily open source; it might be that just the binaries are distributed.
Artistic license gives you quite a freedom what you can do with the product or its sources without setting a lot of limitations on the derivative work. However, quite often artistic license is limited to a non-commercial derivative works only (you can't sell the derivative work for profit) and requires attribution, usually something in the lines of "Based on ... by ..."