The FSF and the Apache Foundation both consider the Apache 2.0 license as compatible with the GPL 3.0 but not with the GPL 2.0.
But the Apache foundation also considers that L/GPL-licensed code is not suitable for inclusion in Apache products as released by the foundation. Yet most lawyers I conferred with consider acceptable to use unmodified LGPL-licensed libraries and Apache-licensed libraries in some product under many licenses, including proprietary licenses.
At this stage, my head wobbles and your eyes spin.
So I can release my code using the Apache license and when combined with a GPL-3.0-licensed library it could be treated as GPL-licensed overall and this would eschew the need for dual licensing.
However (at least per the FSF):
One lax license, Apache 2.0, has patent clauses which are
incompatible with GPL version 2
To also provide compatibility with version 2 of the GPL, and to maximize compatibility I could either:
- license under a choice of Apache 2.0 or GPL 2.0 (or later).
- OR license under a license that would be treated as compatible with the Apache license (such as a BSD or MIT) and the L/GPL v2 and v3 both inside and outside of the FSF and the ASF.
- OR license under an LGPL license that would be treated as incompatible with Apache at the ASF, but considered OK outside, including for inclusion in commercial products and would be treated as GPL-compatible by the FSF. And to maximize compatibility this would likely be an LGPL 2.1 or later.
These would be my options.
To avoid my head to hurt too much, I would look at all this options as if these were code dependency issues between various versions of libraries: I would picture each of these licenses options as various combinations of versions of header files and function signatures some of which compile and work, some other that work sometimes but not always, some that result in a segfault and coredump badly unless I do two triple back-flips on a bike.
Finally, I might provide some build configuration options and documentation similar to FFmpeg such that when my code is built with FFTW3 it is quite explicit to my users when GPL-code is mixed in or not.