diff --git a/config/exiv2-config.in b/config/exiv2-config.in index aca48318..4c593c99 100644 --- a/config/exiv2-config.in +++ b/config/exiv2-config.in @@ -79,7 +79,7 @@ while test $# -gt 0; do ;; --libs) - echo -L$libdir -lexiv2 + echo -L$libdir -lexiv2 @LIBS@ ;; *) diff --git a/config/exiv2.pc.in b/config/exiv2.pc.in index 16c388d9..1e52d46c 100644 --- a/config/exiv2.pc.in +++ b/config/exiv2.pc.in @@ -7,5 +7,5 @@ Name: exiv2 Description: Exif and IPTC metadata library and tools Version: @PACKAGE_VERSION@ URL: http://www.exiv2.org -Libs: -L${libdir} -lexiv2 +Libs: -L${libdir} -lexiv2 @LIBS@ Cflags: -I${includedir} diff --git a/src/Makefile b/src/Makefile index 757a53be..bb545c7b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -136,7 +136,6 @@ LIBRARY = libexiv2.la # Defines, Includes and Libraries CXXDEFS = $(DEFS) CXXINCS = $(INCS) -LDLIBS = $(LIBS) $(LIBRARY) # ****************************************************************************** # ============================================================================== @@ -195,7 +194,8 @@ endif # Compilation shortcuts COMPILE.cc = $(CXX) $(CXXFLAGS) $(CXXDEFS) $(CXXINCS) -c COMPILE.c = $(CC) $(CFLAGS) $(DEFS) $(INCS) -c -LINK.cc = $(CXX) $(CXXFLAGS) $(LDLIBS) $(LDFLAGS) -rpath $(libdir) +# LINK.cc does not need $(LIBS), libtool's dark magic takes care of that +LINK.cc = $(CXX) $(CXXFLAGS) $(LIBRARY) $(LDFLAGS) -rpath $(libdir) # ****************************************************************************** # Rules @@ -246,7 +246,7 @@ $(LIBTOOL): $(LIBTOOL_DEPS) bin: lib $(BINARY) $(EXIV2BIN) $(MCBIN) path-test lib: $(OBJ) - $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) $(LOBJ) -o $(LIBRARY) -rpath $(libdir) -release $(EXIV2_VERSION) + $(LIBTOOL) --mode=link $(CXX) $(LDFLAGS) $(LOBJ) -o $(LIBRARY) -rpath $(libdir) -release $(EXIV2_VERSION) $(LIBS) @touch lib path-test: path-test.o utils.o