[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 3/9] build: check for libintl, and use it



On Tue, Nov 04, 2014 at 04:35:26PM +0100, Pino Toscano wrote:
> Look for libint/gettext and link to it; this properly detects whether
> libint is part of libc.

I'm a little confused by this patch, and also worried that it may be
reverting commit 75514ab57a.

Does this require gettextize?

Rich.

> ---
>  align/Makefile.am          | 1 +
>  builder/Makefile.am        | 2 ++
>  cat/Makefile.am            | 4 ++++
>  configure.ac               | 3 +++
>  customize/Makefile.am      | 2 +-
>  df/Makefile.am             | 1 +
>  diff/Makefile.am           | 1 +
>  edit/Makefile.am           | 1 +
>  erlang/Makefile.am         | 1 +
>  fish/Makefile.am           | 1 +
>  format/Makefile.am         | 1 +
>  fuse/Makefile.am           | 4 ++++
>  inspector/Makefile.am      | 1 +
>  make-fs/Makefile.am        | 1 +
>  mllib/Makefile.am          | 2 +-
>  ocaml/Makefile.am          | 2 ++
>  rescue/Makefile.am         | 1 +
>  resize/Makefile.am         | 2 +-
>  src/Makefile.am            | 6 ++++--
>  sysprep/Makefile.am        | 2 +-
>  test-tool/Makefile.am      | 1 +
>  tests/c-api/Makefile.am    | 4 ++++
>  tests/charsets/Makefile.am | 3 ++-
>  tests/events/Makefile.am   | 1 +
>  tests/qemu/Makefile.am     | 2 ++
>  v2v/link.sh.in             | 2 +-
>  26 files changed, 44 insertions(+), 8 deletions(-)
> 
> diff --git a/align/Makefile.am b/align/Makefile.am
> index 4ecbf7e..92b86b7 100644
> --- a/align/Makefile.am
> +++ b/align/Makefile.am
> @@ -68,6 +68,7 @@ virt_alignment_scan_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la \
>  	-lm
>  
> diff --git a/builder/Makefile.am b/builder/Makefile.am
> index 206abce..f747fc3 100644
> --- a/builder/Makefile.am
> +++ b/builder/Makefile.am
> @@ -168,6 +168,7 @@ OCAMLOPTFLAGS = $(OCAMLCFLAGS)
>  OCAMLCLIBS  = \
>  	$(LIBLZMA_LIBS) \
>  	$(LIBXML2_LIBS) \
> +	$(LIBINTL) \
>  	-L../src/.libs -lutils \
>  	-L../gnulib/lib/.libs -lgnu \
>  	-pthread -lpthread \
> @@ -299,6 +300,7 @@ virt_index_validate_CPPFLAGS = \
>  	-DLOCALEBASEDIR=\""$(datadir)/locale"\"
>  
>  virt_index_validate_LDADD = \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  man_MANS += virt-index-validate.1
> diff --git a/cat/Makefile.am b/cat/Makefile.am
> index 14b8e81..e4d9a36 100644
> --- a/cat/Makefile.am
> +++ b/cat/Makefile.am
> @@ -66,6 +66,7 @@ virt_cat_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  virt_filesystems_SOURCES = \
> @@ -88,6 +89,7 @@ virt_filesystems_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  virt_log_SOURCES = \
> @@ -110,6 +112,7 @@ virt_log_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  virt_ls_SOURCES = \
> @@ -134,6 +137,7 @@ virt_ls_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/configure.ac b/configure.ac
> index dd7a70b..5f3828d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -383,6 +383,9 @@ AC_MSG_RESULT([$msgfmt_is_gnu])
>  AM_CONDITIONAL([HAVE_GNU_GETTEXT],
>      [test "x$XGETTEXT" != "xno" && test "x$MSGCAT" != "xno" && test "x$MSGFMT" != "xno" && test "x$MSGMERGE" != "xno" && test "x$msgfmt_is_gnu" != "xno"])
>  
> +dnl Check for gettext.
> +AM_GNU_GETTEXT([external])
> +
>  dnl Default backend.
>  AC_MSG_CHECKING([if the user specified a default backend])
>  AC_ARG_WITH([default-backend],
> diff --git a/customize/Makefile.am b/customize/Makefile.am
> index 56c5ad5..c945685 100644
> --- a/customize/Makefile.am
> +++ b/customize/Makefile.am
> @@ -124,7 +124,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
>  OCAMLOPTFLAGS = $(OCAMLCFLAGS)
>  
>  OCAMLCLIBS  = \
> -	$(LIBXML2_LIBS) -lncurses -lcrypt \
> +	$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
>  	-L../src/.libs -lutils \
>  	-L../gnulib/lib/.libs -lgnu
>  
> diff --git a/df/Makefile.am b/df/Makefile.am
> index 29e0bf5..e56ac79 100644
> --- a/df/Makefile.am
> +++ b/df/Makefile.am
> @@ -71,6 +71,7 @@ virt_df_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la \
>  	-lm
>  
> diff --git a/diff/Makefile.am b/diff/Makefile.am
> index 3c2c211..65a8a30 100644
> --- a/diff/Makefile.am
> +++ b/diff/Makefile.am
> @@ -56,6 +56,7 @@ virt_diff_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/edit/Makefile.am b/edit/Makefile.am
> index 9b1998b..1e94ac9 100644
> --- a/edit/Makefile.am
> +++ b/edit/Makefile.am
> @@ -61,6 +61,7 @@ virt_edit_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/erlang/Makefile.am b/erlang/Makefile.am
> index c68641c..5a1658c 100644
> --- a/erlang/Makefile.am
> +++ b/erlang/Makefile.am
> @@ -71,6 +71,7 @@ erl_guestfs_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  TESTS_ENVIRONMENT = $(top_builddir)/run --test
> diff --git a/fish/Makefile.am b/fish/Makefile.am
> index e633422..30097ec 100644
> --- a/fish/Makefile.am
> +++ b/fish/Makefile.am
> @@ -144,6 +144,7 @@ guestfish_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(top_builddir)/src/libutils.la \
>  	$(LIBXML2_LIBS) \
> +	$(LTLIBINTL) \
>  	-lm
>  
>  # Make guestfish use the convenience libraries.
> diff --git a/format/Makefile.am b/format/Makefile.am
> index 178c391..276cfc3 100644
> --- a/format/Makefile.am
> +++ b/format/Makefile.am
> @@ -57,6 +57,7 @@ virt_format_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/fuse/Makefile.am b/fuse/Makefile.am
> index 1573361..574e4e0 100644
> --- a/fuse/Makefile.am
> +++ b/fuse/Makefile.am
> @@ -71,6 +71,7 @@ guestmount_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # guestunmount
> @@ -91,6 +92,7 @@ guestunmount_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Documentation.
> @@ -174,6 +176,7 @@ test_guestmount_fd_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  test_guestunmount_fd_SOURCES = \
> @@ -191,6 +194,7 @@ test_guestunmount_fd_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  endif HAVE_FUSE
> diff --git a/inspector/Makefile.am b/inspector/Makefile.am
> index 86e0cd7..e1f5acd 100644
> --- a/inspector/Makefile.am
> +++ b/inspector/Makefile.am
> @@ -84,6 +84,7 @@ virt_inspector_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/make-fs/Makefile.am b/make-fs/Makefile.am
> index 03e30ba..ba1380e 100644
> --- a/make-fs/Makefile.am
> +++ b/make-fs/Makefile.am
> @@ -50,6 +50,7 @@ virt_make_fs_LDADD = \
>  	$(top_builddir)/src/libutils.la \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/mllib/Makefile.am b/mllib/Makefile.am
> index 2ad4eaa..567ff84 100644
> --- a/mllib/Makefile.am
> +++ b/mllib/Makefile.am
> @@ -99,7 +99,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
>  OCAMLOPTFLAGS = $(OCAMLCFLAGS)
>  
>  OCAMLCLIBS  = \
> -	$(LIBXML2_LIBS) -lncurses -lcrypt \
> +	$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
>  	-L../src/.libs -lutils \
>  	-L../gnulib/lib/.libs -lgnu
>  
> diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
> index 41270a6..9723af9 100644
> --- a/ocaml/Makefile.am
> +++ b/ocaml/Makefile.am
> @@ -66,10 +66,12 @@ endif
>  stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm)
>  	$(OCAMLMKLIB) -o mlguestfs \
>  	  $(libguestfsocaml_a_OBJECTS) guestfs.cmo \
> +	  $(LTLIBINTL) \
>  	  -L$(top_builddir)/src/.libs -lguestfs
>  if HAVE_OCAMLOPT
>  	$(OCAMLMKLIB) -o mlguestfs \
>  	  $(libguestfsocaml_a_OBJECTS) guestfs.cmx \
> +	  $(LTLIBINTL) \
>  	  -L$(top_builddir)/src/.libs -lguestfs
>  endif
>  	touch $@
> diff --git a/rescue/Makefile.am b/rescue/Makefile.am
> index 505b327..f380f04 100644
> --- a/rescue/Makefile.am
> +++ b/rescue/Makefile.am
> @@ -59,6 +59,7 @@ virt_rescue_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	../gnulib/lib/libgnu.la
>  
>  # Manual pages and HTML files for the website.
> diff --git a/resize/Makefile.am b/resize/Makefile.am
> index 629fa22..3a7483c 100644
> --- a/resize/Makefile.am
> +++ b/resize/Makefile.am
> @@ -71,7 +71,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
>  OCAMLOPTFLAGS = $(OCAMLCFLAGS)
>  
>  OCAMLCLIBS  = \
> -	$(LIBXML2_LIBS) -lncurses \
> +	$(LIBXML2_LIBS) $(LIBINTL) -lncurses \
>  	-L../src/.libs -lutils \
>  	-L../gnulib/lib/.libs -lgnu
>  
> diff --git a/src/Makefile.am b/src/Makefile.am
> index be8d3a3..a83f257 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -159,7 +159,7 @@ libguestfs_la_LIBADD = \
>  	$(INET_NTOP_LIB) \
>  	$(LIBSOCKET) \
>  	$(LIB_CLOCK_GETTIME) \
> -	$(LIBINTL) \
> +	$(LTLIBINTL) \
>  	$(LTLIBTHREAD) \
>  	$(LTLIBICONV) \
>  	$(SERVENT_LIB)
> @@ -238,7 +238,8 @@ noinst_PROGRAMS += libvirt-is-version
>  libvirt_is_version_SOURCES = libvirt-is-version.c
>  
>  libvirt_is_version_LDADD = \
> -	$(LIBVIRT_LIBS)
> +	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL)
>  
>  libvirt_is_version_CPPFLAGS = \
>  	-DLOCALEBASEDIR=\""$(datadir)/locale"\"
> @@ -266,6 +267,7 @@ test_utils_CFLAGS = \
>  test_utils_LDADD = \
>  	libguestfs_la-guid.lo \
>  	libutils.la \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  check-valgrind:
> diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
> index 17fe612..58c63bb 100644
> --- a/sysprep/Makefile.am
> +++ b/sysprep/Makefile.am
> @@ -136,7 +136,7 @@ OCAMLCFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) $(OCAMLPACKAGES)
>  OCAMLOPTFLAGS = $(OCAMLCFLAGS)
>  
>  OCAMLCLIBS  = \
> -	$(LIBXML2_LIBS) -lncurses -lcrypt \
> +	$(LIBXML2_LIBS) $(LIBINTL) -lncurses -lcrypt \
>  	-L../src/.libs -lutils \
>  	-L../gnulib/lib/.libs -lgnu
>  
> diff --git a/test-tool/Makefile.am b/test-tool/Makefile.am
> index c0e958c..ca5b3ef 100644
> --- a/test-tool/Makefile.am
> +++ b/test-tool/Makefile.am
> @@ -37,6 +37,7 @@ libguestfs_test_tool_CFLAGS = \
>  
>  libguestfs_test_tool_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  libguestfs-test-tool.1 $(top_builddir)/html/libguestfs-test-tool.1.html: stamp-libguestfs-test-tool.pod
> diff --git a/tests/c-api/Makefile.am b/tests/c-api/Makefile.am
> index 6ea22e9..fed1923 100644
> --- a/tests/c-api/Makefile.am
> +++ b/tests/c-api/Makefile.am
> @@ -90,6 +90,7 @@ tests_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  # This binary must be statically linked.  It is used for testing
> @@ -162,6 +163,7 @@ test_backend_settings_CFLAGS = \
>  	$(WARN_CFLAGS) $(WERROR_CFLAGS)
>  test_backend_settings_LDADD = \
>  	$(top_builddir)/src/libutils_la-utils.lo \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/src/libguestfs.la
>  
>  test_private_data_SOURCES = test-private-data.c
> @@ -203,6 +205,7 @@ test_environment_CFLAGS = \
>  	$(WARN_CFLAGS) $(WERROR_CFLAGS)
>  test_environment_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  test_event_string_SOURCES = test-event-string.c
> @@ -214,6 +217,7 @@ test_event_string_CFLAGS = \
>  	$(WARN_CFLAGS) $(WERROR_CFLAGS)
>  test_event_string_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  #if HAVE_LIBVIRT
> diff --git a/tests/charsets/Makefile.am b/tests/charsets/Makefile.am
> index b7ec703..e71f76d 100644
> --- a/tests/charsets/Makefile.am
> +++ b/tests/charsets/Makefile.am
> @@ -33,4 +33,5 @@ test_charset_fidelity_LDADD = \
>  	$(top_builddir)/src/libutils.la \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
> -	$(LIBVIRT_LIBS)
> +	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL)
> diff --git a/tests/events/Makefile.am b/tests/events/Makefile.am
> index 9f31e9e..9bbe322 100644
> --- a/tests/events/Makefile.am
> +++ b/tests/events/Makefile.am
> @@ -43,5 +43,6 @@ test_libvirt_auth_callbacks_LDADD = \
>          $(top_builddir)/src/libguestfs.la \
>          $(LIBVIRT_LIBS) \
>          $(LIBXML2_LIBS) \
> +        $(LTLIBINTL) \
>          $(top_builddir)/gnulib/lib/libgnu.la
>  endif
> diff --git a/tests/qemu/Makefile.am b/tests/qemu/Makefile.am
> index b1b3555..e234063 100644
> --- a/tests/qemu/Makefile.am
> +++ b/tests/qemu/Makefile.am
> @@ -55,6 +55,7 @@ qemu_boot_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
>  
>  qemu_speed_test_SOURCES = \
> @@ -71,4 +72,5 @@ qemu_speed_test_LDADD = \
>  	$(top_builddir)/src/libguestfs.la \
>  	$(LIBXML2_LIBS) \
>  	$(LIBVIRT_LIBS) \
> +	$(LTLIBINTL) \
>  	$(top_builddir)/gnulib/lib/libgnu.la
> diff --git a/v2v/link.sh.in b/v2v/link.sh.in
> index a226947..d6313fe 100644
> --- a/v2v/link.sh.in
> +++ b/v2v/link.sh.in
> @@ -19,4 +19,4 @@
>  # Hack automake to link binary properly.  There is no other way to add
>  # the -cclib parameter to the end of the command line.
>  
> -exec "$@" -linkpkg -cclib '-lutils -lncurses -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ -lgnu'
> +exec "$@" -linkpkg -cclib '-lutils -lncurses -lcrypt @LIBVIRT_LIBS@ @LIBXML2_LIBS@ @LIBINTL@ -lgnu'
> -- 
> 1.9.3
> 
> _______________________________________________
> Libguestfs mailing list
> Libguestfs redhat com
> https://www.redhat.com/mailman/listinfo/libguestfs

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]