Autoreconf problems on OSX with CVS version - proposed change

Tony Theodore <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hello,

The mingw-cross-env [1] project recently switched to using the CVS
version of FreeTDS and there is small problem on OSX. The ./configure
script produced by autoreconf has a dangling dot on line 5 that causes
the script to stop. This is caused by a quirk in OSX sh.

From man echo:

 Most notably, the builtin echo in sh(1) does not accept the -n option.
 ....
 Applications aiming for maximum portability are strongly encouraged to use
          printf(1) to suppress the newline character.

The proposed change to configure.ac below has been tested on FreeBSD,
openSUSE, OSX, and Ubuntu.


diff -ur orig/configure.ac new/configure.ac
--- orig/configure.ac	2010-09-13 22:54:42.000000000 +1000
+++ new/configure.ac	2010-09-13 22:56:35.000000000 +1000
@@ -12,7 +12,7 @@
 # ------------------------------------------------------------
 # Initialization
 # ------------------------------------------------------------
-AC_INIT(FreeTDS, 0.83.dev.esyscmd(echo -n $(date +"%Y%m%d")))
+AC_INIT(FreeTDS, 0.83.dev.esyscmd(printf $(date +"%Y%m%d")))
 AC_CONFIG_SRCDIR(src/dblib/dblib.c)
 AC_PREREQ(2.53)
 AC_REVISION($Revision: 1.55 $)


Cheers,

Tony


[1] http://www.nongnu.org/mingw-cross-env/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.