]> git.draconx.ca Git - dxcommon.git/blobdiff - m4/join.m4
Implement the -a and -v options in join.awk.
[dxcommon.git] / m4 / join.m4
index 2f25ce80d9b535c89cbac8c7a7534a9dac3b89ae..a0a8d10bb26d73fe781271beefb54d9896495357 100644 (file)
@@ -10,7 +10,15 @@ dnl Search PATH for standard POSIX "join" utility.  If found, the JOIN
 dnl variable (which is substituted by AC_SUBST) is set to the result and
 dnl the cache variable dx_cv_join_works is set to "yes".  Otherwise,
 dnl dx_cv_join_works is set to "no" and JOIN is set to an incomplete
-dnl awk-based implementation which supports no options.
+dnl awk-based implementation.
+dnl
+dnl The awk replacement currently has the following limitations:
+dnl
+dnl   - Only the -v and -a options are supported.
+dnl
+dnl   - Due to limitations of some awk implementations, a filename of "-"
+dnl     to mean standard input should be avoided for the second file name.
+dnl     Nevertheless, using "-" for the first filename should be portable.
 
 AC_DEFUN([DX_PROG_JOIN], [AC_PREREQ([2.62])dnl
 AC_REQUIRE([AC_PROG_AWK])dnl
@@ -34,7 +42,7 @@ AS_IF([test x"$dx_cv_join_works" != x"yes"],
 [JOIN="$AWK -f m4_do(
   [m4_pushdef([m4_include], [$][1])],
   [m4_include(DX_BASEDIR[/scripts/join.awk])],
-  [m4_popdef([m4_include])])"])])
+  [m4_popdef([m4_include])]) --"])])
 
 AC_DEFUN([_DX_JOIN_DO_TEST],
 [AS_IF([test ! -f conftest.b],