Add INTLLIBS back into librazor_la_LIBADD and also into razor.pc
authorJ. Ali Harlow <ali@juiblex.co.uk>
Fri Oct 03 15:05:33 2014 +0100 (2014-10-03)
changeset 4531fd1d221092d
parent 452 06885e558546
child 454 56ff755c268c
Add INTLLIBS back into librazor_la_LIBADD and also into razor.pc

INTLLIBS was originally added into librazor_la_LIBADD (but not razor.pc)
in 611c84a3f4b4538a65d186050608c17adbf17770 and then removed in
236cfc8ecc5c66288e41bf9b72051a3b18326e1c over concerns that it meant
that building static applications (eg., in plover) required a static
version of libintl. Since then, however, the inclusion of gnulib's
getopt has caused the build to fail without INTLLIBS in librazor_la_LIBADD
with messages of the form:

../gl/.libs/libgnu.a(getopt.o): In function `_getopt_internal_r':
/home/ali/wk/razor/vpath/gl/../../working/gl/getopt.c:808: undefined reference to `libintl_gettext'

while building librazor.dll.a

Thus it appears that INTLLIBS really is needed and should go back into
librazor_la_LIBADD (which fixes the build) and should also be in Libs.private
in razor.pc for static builds. This means that a static version of libintl
will be required (eg., as part of mingw64-gettext-static).

Along the way, razor.pc has also been fixed to avoid overlinking
(https://wiki.openmandriva.org/en/Overlinking_issues_in_packaging)
and a missing include directory that caused the razor executable to
fail to build was added.
data/razor.pc.in
librazor/Makefile.am
src/Makefile.am
     1.1 --- a/data/razor.pc.in	Fri Oct 03 12:26:22 2014 +0100
     1.2 +++ b/data/razor.pc.in	Fri Oct 03 15:05:33 2014 +0100
     1.3 @@ -6,7 +6,8 @@
     1.4  Name: razor
     1.5  Description: library for depsolving, installing and removing packages
     1.6  Version: @VERSION@
     1.7 -Requires: @REQUIREMENTS@
     1.8 -Libs: -L${libdir} -lrazor @EXPAT_LIBS@ @ZLIB_LIBS@ @EXTRA_LIBS@
     1.9 +Requires.private: @REQUIREMENTS@
    1.10 +Libs: -L${libdir} -lrazor
    1.11 +Libs.private: @EXPAT_LIBS@ @ZLIB_LIBS@ @INTLLIBS@ @EXTRA_LIBS@
    1.12  Cflags: -I${includedir}/razor
    1.13  
     2.1 --- a/librazor/Makefile.am	Fri Oct 03 12:26:22 2014 +0100
     2.2 +++ b/librazor/Makefile.am	Fri Oct 03 15:05:33 2014 +0100
     2.3 @@ -46,7 +46,7 @@
     2.4  endif
     2.5  
     2.6  librazor_la_LIBADD = $(ZLIB_LIBS) types/libtypes.la $(LUA_LIBS) \
     2.7 -	../gl/libgnu.la $(EXTRA_LIBS)
     2.8 +	../gl/libgnu.la $(INTLLIBS) $(EXTRA_LIBS)
     2.9  librazor_la_LDFLAGS = -no-undefined \
    2.10  	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    2.11  
     3.1 --- a/src/Makefile.am	Fri Oct 03 12:26:22 2014 +0100
     3.2 +++ b/src/Makefile.am	Fri Oct 03 15:05:33 2014 +0100
     3.3 @@ -7,7 +7,7 @@
     3.4  	$(RPM_CFLAGS) \
     3.5  	-I$(top_builddir)/gl -I$(top_srcdir)/gl \
     3.6  	-I$(top_builddir)/src -I$(top_srcdir)/src \
     3.7 -	-I$(top_srcdir)/librazor \
     3.8 +	-I$(top_builddir)/librazor -I$(top_srcdir)/librazor \
     3.9  	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
    3.10  	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \
    3.11  	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \