diff --git a/README b/README index caa6c7db..2e742710 100644 --- a/README +++ b/README @@ -39,6 +39,9 @@ To uninstall Exiv2 from a UNIX-like system, run: $ make uninstall +To build a commercial version of the Exiv2 library, see also section +"Commercial version" at the end of this file. + Dependencies ============ @@ -130,4 +133,20 @@ for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software -Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA. +Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, +MA 02110-1301 USA. + + +Commercial version +================== + +If you have a commercial license, you must disable NLS support, +conversion of UCS2 characters in XP tags and the conversion of +Exif.Nikon3.LensData values to lens names to build a commercial +version of the Exiv2 library. + +To do this on Windows, compile the library with the preprocessor +symbol EXV_COMMERCIAL_VERSION defined. See the file src/exv_msvc.h +for details. +On UNIX-like systems, run the configure script with the options +--enable-commercial --disable-nls --disable-printucs2 --disable-lensdata diff --git a/config/config.mk.in b/config/config.mk.in index 281046a2..96d2eff9 100644 --- a/config/config.mk.in +++ b/config/config.mk.in @@ -30,6 +30,8 @@ # ********************************************************************** # Exiv2 version for use with libtool (-version-info argument) EXIV2_LTVERSION = @EXIV2_LTVERSION@ +# Compile for use with a commercial license +COMMERCIAL_VERSION = @COMMERCIAL_VERSION@ # ********************************************************************** # Libtool @@ -52,6 +54,9 @@ CXXCPP = @CXXCPP@ # Preprocessor flags CPPFLAGS = -I. @CPPFLAGS@ -DEXV_LOCALEDIR=\"$(localedir)\" +ifeq ($(COMMERCIAL_VERSION),yes) + CPPFLAGS += -DEXV_COMMERCIAL_VERSION=1 +endif # Linker flags and libraries LDFLAGS = @LDFLAGS@ diff --git a/config/configure.ac b/config/configure.ac index f5fe57c6..8a9355f7 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -132,6 +132,13 @@ else fi AC_SUBST(EXV_LIB_STATIC) +AC_MSG_CHECKING([whether to compile a commercial version of the Exiv2 library]) +AC_ARG_ENABLE(commercial, + [ --enable-commercial compile with the EXV_COMMERCIAL_VERSION symbol set ], + COMMERCIAL_VERSION=$enableval, COMMERCIAL_VERSION=no) +AC_MSG_RESULT($COMMERCIAL_VERSION) +AC_SUBST(COMMERCIAL_VERSION,$COMMERCIAL_VERSION) + # --------------------------------------------------------------------------- # Create output files. # ---------------------------------------------------------------------------