[Top][All Lists]

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

bug#19569: Problem with line splitting output from func_emit_wrapper

From: Aaron Burghardt
Subject: bug#19569: Problem with line splitting output from func_emit_wrapper
Date: Sun, 11 Jan 2015 06:14:26 -0500

I am attempting to cross-compile the standard jpeg source, http://www.ijg.org, with mingw-w64 on OS X. The build fails because executables wrapped by libtool do not compile. The jpeg source comes with an ltmain.sh script produced by libtool version 2.4.2 . I happen to have libtool 2.4 installed, and I was able to build the project by running libtoolize, which generated an ltmain.sh from my older version. I tracked the issue down to a change in a sed command in ltmain.sh that splits long lines in the output of func_emit_wrapper() to make the output suitable for all compilers. This list thread lead to the following patch:

To save having to click the link, the commit is:

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 0418007..1078e75 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4268,9 +4268,15 @@ void lt_dump_script (FILE* f)
     func_emit_wrapper yes |
-              $SED -e 's/\([\\"]\)/\\\1/g' \
-           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
+      $SED -n -e '
+s/\([^\n]*\).*/  fputs ("\1", f);/p
             cat <<"EOF"

OS X’s sed is not GNU sed, is older, and doesn’t support many of GNU sed’s extensions. I could install GNU sed to resolve this, but I’m curious, is the sed command not POSIX compliant, or is OS X’s sed not POSIX compliant? Am I correct to think POSIX compliance is a goal of autotools?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]