This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

1.3.2: bash-2.0.5(6) -autoconf 2.52 AC_OUTPUT problem on W2K



Hi,

I have a problem with the combination of
- GNU bash, version 2.05.0(6)-release (i686-pc-cygwin)
- autoconf (GNU Autoconf) 2.52
on W2K.

DOS CR/LF line ends in the parameter passed to AC_OUTPUT cause
config.status to fail.

We have a macro AC_FINISH which internally uses AC_OUTPUT:

dnl --------------------------------------------------------------------
--
dnl Restore CFLAGS, filter duplicate entries from LIBS
dnl --------------------------------------------------------------------
--

AC_DEFUN([AC_FINISH],
[CFLAGS="$CFLAGS_SAVE"
LIB_LIST="" && for i in $LIBS; do case "$LIB_LIST" in *"$i") ;; *"$i "*)
;; *) LIB_LIST="$LIB_LIST $i"; ;; esac; done
LIBS=$LIB_LIST]
[AC_OUTPUT($1)]
)

A typical use case in 'configure.in' is:

AC_FINISH(config/Make.rules:config/Make.rules.in:../config/Make.rules.in
Makefile \
	include/Makefile \
	include/JTCC/Makefile \
	src/Makefile test/Makefile \
	demo/Makefile)

If a parameter passed to AC_OUTPUT contains DOS CR/LF line endings in a
'configure.in' file (e.g. at places (1) then the output generated in
'config.status' "preserves" the line endings as '^M' which makes the
approriate run fail.
If a '\' is followed by a CR/LF, then this '\' arrives unmodified in
'config.status'.

AC_FINISH(config/Make.rules:config/Make.rules.in:../config/Make.rules.in
Makefile \0x0a
	include/Makefile \0x0a
	include/JTCC/Makefile 0x0d 0x0a
	                      ^(1)
	src/Makefile test/Makefile \0x0d 0x0a
                                 ^(2)
	demo/Makefile)

The resulting output in config.status with the above example is:

config_files="
config/Make.rules:config/Make.rules.in:../config/Make.rules.in Makefile
include/Makefile include/JTCC/Makefile \^M src/Makefile ^M
                                                 ^(3)            ^(4)
 test/Makefile demo/Makefile"


The result of this is:
-----------------------------------------------------
...
cd .; ./config.status
config.status: creating config/Make.rules
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/JTCC/Makefile
config.status: creating \
                       ^(5) corrsponds to (3) above.
.infig.status: error: cannot find input file: \
make: *** [Makefile] Error 1
-----------------------------------------------------

According to the autoconf doc., the shell interpretes the parameter
passed to AC_OUTPUT.


Best regards,
Manfred



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]