From: Bruno Haible Date: Sat, 25 Apr 2020 10:55:57 +0000 (+0200) Subject: examples: Improve code style. X-Git-Tag: v0.21~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa36bed7f2afbb2ac81d420f9f2e5a7b6358e50f;p=thirdparty%2Fgettext.git examples: Improve code style. * gettext-tools/examples/hello-*/configure.ac: Improve quoting. --- diff --git a/gettext-tools/examples/hello-c-gnome3/configure.ac b/gettext-tools/examples/hello-c-gnome3/configure.ac index fca55a17c..5f62f55d9 100644 --- a/gettext-tools/examples/hello-c-gnome3/configure.ac +++ b/gettext-tools/examples/hello-c-gnome3/configure.ac @@ -24,12 +24,12 @@ dnl dnl Here, in gettext-tools/examples, we do the checks manually for dnl simplicity. -AC_PATH_PROG(GLIB_COMPILE_RESOURCES, [glib-compile-resources]) +AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources]) AS_IF([test -z "$GLIB_COMPILE_RESOURCES"], [ AC_MSG_ERROR([can't find glib-compile-resources]) ]) -AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, [glib-compile-schemas]) +AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas]) AS_IF([test -z "$GLIB_COMPILE_SCHEMAS"], [ AC_MSG_ERROR([can't find glib-compile-schemas]) ]) @@ -45,10 +45,10 @@ AS_IF(["$PKG_CONFIG" --exists "$GTK"], , [ ]) GTK_CFLAGS=`"$PKG_CONFIG" --cflags "$GTK"` -AC_SUBST(GTK_CFLAGS) +AC_SUBST([GTK_CFLAGS]) GTK_LIBS=`"$PKG_CONFIG" --libs "$GTK"` -AC_SUBST(GTK_LIBS) +AC_SUBST([GTK_LIBS]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([m4/Makefile]) diff --git a/gettext-tools/examples/hello-clisp/configure.ac b/gettext-tools/examples/hello-clisp/configure.ac index 041dad400..a4b006f62 100644 --- a/gettext-tools/examples/hello-clisp/configure.ac +++ b/gettext-tools/examples/hello-clisp/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.lisp.in]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the Lisp system. -AC_PATH_PROG(CLISP, clisp) +AC_PATH_PROG([CLISP], [clisp]) if test -z "$CLISP"; then echo "*** Essential program clisp not found" 1>&2 exit 1 fi -AC_SUBST(CLISP) +AC_SUBST([CLISP]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-csharp-forms/configure.ac b/gettext-tools/examples/hello-csharp-forms/configure.ac index 95bf0baeb..c206f9844 100644 --- a/gettext-tools/examples/hello-csharp-forms/configure.ac +++ b/gettext-tools/examples/hello-csharp-forms/configure.ac @@ -14,7 +14,7 @@ if test -n "$HAVE_CSHARPCOMP"; then else BUILDCSHARP=no fi -AC_SUBST(BUILDCSHARP) +AC_SUBST([BUILDCSHARP]) dnl Check whether we can execute C# programs. gt_CSHARPEXEC([csharpexec-test.exe], [$srcdir/m4]) @@ -23,7 +23,7 @@ if test -n "$HAVE_CSHARPEXEC" && test $BUILDCSHARP = yes; then else TESTCSHARP=no fi -AC_SUBST(TESTCSHARP) +AC_SUBST([TESTCSHARP]) dnl Checks for needed libraries. AM_PATH_PROG_WITH_TEST([GETTEXT_WITH_GNU_GETTEXT_DLL], [gettext], diff --git a/gettext-tools/examples/hello-csharp/configure.ac b/gettext-tools/examples/hello-csharp/configure.ac index 4565d346c..c9b95de05 100644 --- a/gettext-tools/examples/hello-csharp/configure.ac +++ b/gettext-tools/examples/hello-csharp/configure.ac @@ -14,7 +14,7 @@ if test -n "$HAVE_CSHARPCOMP"; then else BUILDCSHARP=no fi -AC_SUBST(BUILDCSHARP) +AC_SUBST([BUILDCSHARP]) dnl Check whether we can execute C# programs. gt_CSHARPEXEC([csharpexec-test.exe], [$srcdir/m4]) @@ -23,7 +23,7 @@ if test -n "$HAVE_CSHARPEXEC" && test $BUILDCSHARP = yes; then else TESTCSHARP=no fi -AC_SUBST(TESTCSHARP) +AC_SUBST([TESTCSHARP]) dnl Checks for needed libraries. AM_PATH_PROG_WITH_TEST([GETTEXT_WITH_GNU_GETTEXT_DLL], [gettext], diff --git a/gettext-tools/examples/hello-gawk/configure.ac b/gettext-tools/examples/hello-gawk/configure.ac index aa1fd4de1..a55f324a3 100644 --- a/gettext-tools/examples/hello-gawk/configure.ac +++ b/gettext-tools/examples/hello-gawk/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.awk]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of GNU awk. -AC_PATH_PROG(GAWK, gawk) +AC_PATH_PROG([GAWK], [gawk]) if test -z "$GAWK"; then echo "*** Essential program gawk not found" 1>&2 exit 1 fi -AC_SUBST(GAWK) +AC_SUBST([GAWK]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-guile/configure.ac b/gettext-tools/examples/hello-guile/configure.ac index 2906dbd77..4ffe71536 100644 --- a/gettext-tools/examples/hello-guile/configure.ac +++ b/gettext-tools/examples/hello-guile/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.scm]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the guile interpreter. -AC_PATH_PROG(GUILE, guile) +AC_PATH_PROG([GUILE], [guile]) if test -z "$GUILE"; then echo "*** Essential program guile not found" 1>&2 exit 1 fi -AC_SUBST(GUILE) +AC_SUBST([GUILE]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-java-awt/configure.ac b/gettext-tools/examples/hello-java-awt/configure.ac index 7d84a97c6..57fd16851 100644 --- a/gettext-tools/examples/hello-java-awt/configure.ac +++ b/gettext-tools/examples/hello-java-awt/configure.ac @@ -11,19 +11,19 @@ dnl Check whether we can execute Java programs. gt_JAVAEXEC([TestAWT], [$srcdir/m4]) dnl Check whether we can build Java programs. gt_JAVACOMP([1.5]) -AC_CHECK_PROG(JAR, jar, jar) +AC_CHECK_PROG([JAR], [jar], [jar]) if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then BUILDJAVA=yes else BUILDJAVA=no fi -AC_SUBST(BUILDJAVA) +AC_SUBST([BUILDJAVA]) if test -n "$HAVE_JAVAEXEC" && test "$BUILDJAVA" = yes; then TESTJAVA=yes else TESTJAVA=no fi -AC_SUBST(TESTJAVA) +AC_SUBST([TESTJAVA]) dnl Checks for compiler output filename suffixes. AC_OBJEXT diff --git a/gettext-tools/examples/hello-java-qtjambi/configure.ac b/gettext-tools/examples/hello-java-qtjambi/configure.ac index 33c10d3f6..0d4a23cdd 100644 --- a/gettext-tools/examples/hello-java-qtjambi/configure.ac +++ b/gettext-tools/examples/hello-java-qtjambi/configure.ac @@ -11,19 +11,19 @@ dnl Check whether we can execute Java programs. gt_JAVAEXEC([Test15], [$srcdir/m4]) dnl Check whether we can build Java programs. gt_JAVACOMP([1.5], [1.6]) -AC_CHECK_PROG(JAR, jar, jar) +AC_CHECK_PROG([JAR], [jar], [jar]) if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then BUILDJAVA=yes else BUILDJAVA=no fi -AC_SUBST(BUILDJAVA) +AC_SUBST([BUILDJAVA]) if test -n "$HAVE_JAVAEXEC" && test "$BUILDJAVA" = yes; then TESTJAVA=yes else TESTJAVA=no fi -AC_SUBST(TESTJAVA) +AC_SUBST([TESTJAVA]) dnl Checks for compiler output filename suffixes. AC_OBJEXT diff --git a/gettext-tools/examples/hello-java-swing/configure.ac b/gettext-tools/examples/hello-java-swing/configure.ac index 227e7bcd2..cdedcd6ba 100644 --- a/gettext-tools/examples/hello-java-swing/configure.ac +++ b/gettext-tools/examples/hello-java-swing/configure.ac @@ -11,19 +11,19 @@ dnl Check whether we can execute Java programs. gt_JAVAEXEC([TestAWT], [$srcdir/m4]) dnl Check whether we can build Java programs. gt_JAVACOMP([1.5]) -AC_CHECK_PROG(JAR, jar, jar) +AC_CHECK_PROG([JAR], [jar], [jar]) if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then BUILDJAVA=yes else BUILDJAVA=no fi -AC_SUBST(BUILDJAVA) +AC_SUBST([BUILDJAVA]) if test -n "$HAVE_JAVAEXEC" && test "$BUILDJAVA" = yes; then TESTJAVA=yes else TESTJAVA=no fi -AC_SUBST(TESTJAVA) +AC_SUBST([TESTJAVA]) dnl Checks for compiler output filename suffixes. AC_OBJEXT diff --git a/gettext-tools/examples/hello-java/configure.ac b/gettext-tools/examples/hello-java/configure.ac index e4512fd94..2206ce9ca 100644 --- a/gettext-tools/examples/hello-java/configure.ac +++ b/gettext-tools/examples/hello-java/configure.ac @@ -11,19 +11,19 @@ dnl Check whether we can execute Java programs. gt_JAVAEXEC dnl Check whether we can build Java programs. gt_JAVACOMP([1.5]) -AC_CHECK_PROG(JAR, jar, jar) +AC_CHECK_PROG([JAR], [jar], [jar]) if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then BUILDJAVA=yes else BUILDJAVA=no fi -AC_SUBST(BUILDJAVA) +AC_SUBST([BUILDJAVA]) if test -n "$HAVE_JAVAEXEC" && test "$BUILDJAVA" = yes; then TESTJAVA=yes else TESTJAVA=no fi -AC_SUBST(TESTJAVA) +AC_SUBST([TESTJAVA]) dnl Checks for compiler output filename suffixes. AC_OBJEXT diff --git a/gettext-tools/examples/hello-librep/configure.ac b/gettext-tools/examples/hello-librep/configure.ac index ae49fcf3d..d7dddda84 100644 --- a/gettext-tools/examples/hello-librep/configure.ac +++ b/gettext-tools/examples/hello-librep/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.jl.in]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the librep interpreter. -AC_PATH_PROG(REP, rep) +AC_PATH_PROG([REP], [rep]) if test -z "$REP"; then echo "*** Essential program rep not found" 1>&2 exit 1 fi -AC_SUBST(REP) +AC_SUBST([REP]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-objc/configure.ac b/gettext-tools/examples/hello-objc/configure.ac index 39a621bed..f764c66a4 100644 --- a/gettext-tools/examples/hello-objc/configure.ac +++ b/gettext-tools/examples/hello-objc/configure.ac @@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([hello.m]) AM_INIT_AUTOMAKE([1.11]) AC_PROG_CC -AC_SUBST(OBJC,["$CC"]) +AC_SUBST([OBJC], ["$CC"]) AC_CHECK_HEADERS([unistd.h]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.20.2]) diff --git a/gettext-tools/examples/hello-pascal/configure.ac b/gettext-tools/examples/hello-pascal/configure.ac index 1585e5d4f..2c20bb81e 100644 --- a/gettext-tools/examples/hello-pascal/configure.ac +++ b/gettext-tools/examples/hello-pascal/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.pas]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the Free Pascal Compiler. -AC_PATH_PROGS(PPC, ppc386 ppcx64) +AC_PATH_PROGS([PPC], [ppc386 ppcx64]) if test -z "$PPC"; then echo "*** Essential program ppc386 or ppcx64 not found" 1>&2 exit 1 fi -AC_SUBST(PPC) +AC_SUBST([PPC]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-perl/configure.ac b/gettext-tools/examples/hello-perl/configure.ac index 885ef164c..7699d7e39 100644 --- a/gettext-tools/examples/hello-perl/configure.ac +++ b/gettext-tools/examples/hello-perl/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello-1.pl.in]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the Perl interpreter. -AC_PATH_PROG(PERL, perl) +AC_PATH_PROG([PERL], [perl]) if test -z "$PERL"; then echo "*** Essential program perl not found" 1>&2 exit 1 fi -AC_SUBST(PERL) +AC_SUBST([PERL]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-php/configure.ac b/gettext-tools/examples/hello-php/configure.ac index e686d457e..c9429ea15 100644 --- a/gettext-tools/examples/hello-php/configure.ac +++ b/gettext-tools/examples/hello-php/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.php]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the PHP system. -AC_PATH_PROG(PHP, php) +AC_PATH_PROG([PHP], [php]) if test -z "$PHP"; then echo "*** Essential program php not found" 1>&2 exit 1 fi -AC_SUBST(PHP) +AC_SUBST([PHP]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-python/configure.ac b/gettext-tools/examples/hello-python/configure.ac index 80acee95d..10aeaa2e2 100644 --- a/gettext-tools/examples/hello-python/configure.ac +++ b/gettext-tools/examples/hello-python/configure.ac @@ -26,7 +26,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-sh/configure.ac b/gettext-tools/examples/hello-sh/configure.ac index ed3e57400..f05cf3ec3 100644 --- a/gettext-tools/examples/hello-sh/configure.ac +++ b/gettext-tools/examples/hello-sh/configure.ac @@ -19,7 +19,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-smalltalk/configure.ac b/gettext-tools/examples/hello-smalltalk/configure.ac index 820a30a46..8bc7688fa 100644 --- a/gettext-tools/examples/hello-smalltalk/configure.ac +++ b/gettext-tools/examples/hello-smalltalk/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.st.in]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of GNU Smalltalk. -AC_PATH_PROG(GST, gst) +AC_PATH_PROG([GST], [gst]) if test -z "$GST"; then echo "*** Essential program gst not found" 1>&2 exit 1 fi -AC_SUBST(GST) +AC_SUBST([GST]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -27,7 +27,7 @@ prefix="$final_prefix" eval "datarootdir=\"${datarootdir}\"" eval "localedir=\"${datadir}/locale\"" prefix="$save_prefix" -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-tcl-tk/configure.ac b/gettext-tools/examples/hello-tcl-tk/configure.ac index dc1596378..7d95739de 100644 --- a/gettext-tools/examples/hello-tcl-tk/configure.ac +++ b/gettext-tools/examples/hello-tcl-tk/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.tcl]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the Tcl/Tk interpreter. -AC_PATH_PROG(WISH, wish) +AC_PATH_PROG([WISH], [wish]) if test -z "$WISH"; then echo "*** Essential program wish not found" 1>&2 exit 1 fi -AC_SUBST(WISH) +AC_SUBST([WISH]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -32,7 +32,7 @@ pkgdatadir="${datadir}/${PACKAGE}" datadir="$save_datadir" datarootdir="$save_datarootdir" prefix="$save_prefix" -AC_SUBST(pkgdatadir) +AC_SUBST([pkgdatadir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-tcl/configure.ac b/gettext-tools/examples/hello-tcl/configure.ac index 3c30d521b..61c065bea 100644 --- a/gettext-tools/examples/hello-tcl/configure.ac +++ b/gettext-tools/examples/hello-tcl/configure.ac @@ -8,12 +8,12 @@ AC_CONFIG_SRCDIR([hello.tcl]) AM_INIT_AUTOMAKE([1.11]) dnl Check for availability of the Tcl interpreter. -AC_PATH_PROG(TCLSH, tclsh) +AC_PATH_PROG([TCLSH], [tclsh]) if test -z "$TCLSH"; then echo "*** Essential program tclsh not found" 1>&2 exit 1 fi -AC_SUBST(TCLSH) +AC_SUBST([TCLSH]) dnl The installed program must know where to find its message catalogs. dnl Unfortunately, prefix gets only finally determined at the end of configure. @@ -32,7 +32,7 @@ pkgdatadir="${datadir}/${PACKAGE}" datadir="$save_datadir" datarootdir="$save_datarootdir" prefix="$save_prefix" -AC_SUBST(pkgdatadir) +AC_SUBST([pkgdatadir]) dnl Support for the po directory. AM_PO_SUBDIRS diff --git a/gettext-tools/examples/hello-ycp/configure.ac b/gettext-tools/examples/hello-ycp/configure.ac index 78f88c408..59b408372 100644 --- a/gettext-tools/examples/hello-ycp/configure.ac +++ b/gettext-tools/examples/hello-ycp/configure.ac @@ -16,7 +16,7 @@ test -f /usr/lib/YaST2/bin/y2base || { dnl The installed program must know where to find its message catalogs. dnl Unfortunately, YaST hard codes the message catalog directory. localedir=/usr/share/YaST2/locale -AC_SUBST(localedir) +AC_SUBST([localedir]) dnl Support for the po directory. AM_PO_SUBDIRS