Opened 8 years ago

Last modified 8 years ago

#156 closed defect

autoconf: Make options with spaces supported in LDFLAGS etc. — at Initial Version

Reported by: dmik Owned by:
Priority: major Milestone:
Component: automake/autoconf Version:
Severity: medium Keywords:
Cc:

Description

autoconf has a problem that prevents from using options with spaces in LDFLAGS and other similar variables (e.g. a typical "-Zlinker 'DISABLE 1121' to kill the infamous and highly annoying "symbol is already exported" WLINK warning). This problem is illustrated by the following code:

#!/bin/sh

CMD='python.exe -c "import sys; print sys.argv" $LDFLAGS'
LDFLAGS="-lcx -Zlinker 'DISABLE 1121'"

eval $CMD

You will get this output:

['-c', '-lcx', '-Zlinker', "'DISABLE", "1121'"]

Where you can clearly see that the value for the -Zlinker option was split instead of being passed as a whole. In case of a compiler, this makes it think that 1121" is a file and fail with "file not found" error.

Note that the problem only shows up in autoconf when LDFLAGS appears in eval and such. And this happens in many places, e.g. in AC_CHECK_LIB functions which simply start always failing in such a case.

Change History (0)

Note: See TracTickets for help on using tickets.