From: Bruno Haible Date: Sat, 18 May 2019 22:33:19 +0000 (+0200) Subject: build: Restore the ability to build gettext-tools separately, part 2. X-Git-Tag: v0.20.2~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37af7d71252a3967b4f98a4a9ed3477ea50d40a2;p=thirdparty%2Fgettext.git build: Restore the ability to build gettext-tools separately, part 2. * gettext-tools/configure.ac: New option --with-installed-csharp-dll. (USE_INSTALLED_CSHARP_DLL): New conditional. * gettext-tools/src/Makefile.am (CSHARP_DLL_DIR): New variable. (msgunfmt.net.exe): Use it. * configure.ac: Filter out --with-installed-csharp-dll from inherited --help output. * PACKAGING: Document that gettext-tools's configure needs to be invoked with --with-installed-csharp-dll. --- diff --git a/PACKAGING b/PACKAGING index 52b80ac7e..f4bae4561 100644 --- a/PACKAGING +++ b/PACKAGING @@ -42,7 +42,7 @@ The 'libtextstyle' binary package can be installed by doing The 'gettext-tools' binary package can be installed by doing cd gettext-tools - ./configure --with-installed-libtextstyle + ./configure --with-installed-libtextstyle --with-installed-csharp-dll make make install diff --git a/configure.ac b/configure.ac index 0c84bdd72..49689fb01 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,7 @@ AC_CANONICAL_HOST dnl Optional Features: AC_ARG_ENABLE calls dnl Optional Packages: AC_ARG_WITH calls dnl Some influential environment variables: AC_ARG_VAR calls -esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle; } | sed -f build-aux/ac-help.sed ]) +esyscmd([{ cd gettext-runtime && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; cd libtextstyle && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; { cd gettext-tools && autoconf --trace=AC_ARG_ENABLE:'$n([$1],[$2])' --trace=AC_ARG_WITH:'$n([$1],[$2])' --trace=AC_ARG_VAR:'$n($@)' && cd ..; } | grep -v installed.libtextstyle | grep -v installed.csharp | grep -v 'installed C#'; } | sed -f build-aux/ac-help.sed ]) AC_CONFIG_FILES([Makefile]) diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 104b067ba..52868da46 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -147,6 +147,20 @@ fi AM_CONDITIONAL([USE_INSTALLED_LIBTEXTSTYLE], [test "$gt_use_installed_libtextstyle" != no]) +dnl This option allows to build gettext-tools without (re)building GNU.Gettext.dll. +AC_ARG_WITH([installed-csharp-dll], + [AS_HELP_STRING([--with-installed-csharp-dll], + [Use an already installed C# DLL.])], + [gt_use_installed_csharp_dll=$withval], + [gt_use_installed_csharp_dll=no]) +if test "$gt_use_installed_csharp_dll" = no; then + test -f ../gettext-runtime/intl-csharp/Makefile || { + AC_MSG_ERROR([When building the gettext-tools package without building the entire gettext package, you need to pass the --with-installed-csharp-dll option to configure.]) + } +fi +AM_CONDITIONAL([USE_INSTALLED_CSHARP_DLL], + [test "$gt_use_installed_csharp_dll" != no]) + dnl This line internationalizes the bison generated parsers. BISON_I18N diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index af3dcee15..1ec1587a5 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -616,8 +616,13 @@ all-csharp-no: msgfmt.net.exe: msgfmt.cs $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ $(srcdir)/msgfmt.cs +if USE_INSTALLED_CSHARP_DLL +CSHARP_DLL_DIR = $(libdir) +else +CSHARP_DLL_DIR = ../../gettext-runtime/intl-csharp +endif msgunfmt.net.exe: msgunfmt.cs - $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ -L ../../gettext-runtime/intl-csharp -l GNU.Gettext $(srcdir)/msgunfmt.cs + $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ -L '$(CSHARP_DLL_DIR)' -l GNU.Gettext $(srcdir)/msgunfmt.cs install-exec-local: install-exec-csharp-@BUILDCSHARP@ install-exec-csharp-yes: all-csharp-yes