Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-05-21
10:18 • Closed ticket [2750886fff]: incorrect handling of CFLAGS on configure command li... artifact: d7c39fa2ff user: das
03:52 • Ticket [2750886fff]: 4 changes artifact: f9dab8e5d8 user: dgp
2009-04-10
21:41 • New ticket [2750886fff]. artifact: 31c1f78f32 user: marcomaggi

incorrect handling of CFLAGS on configure command line

Closed / Out of Date2750886fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2009-04-10 21:41:04
Configuring Tcl 8.6b1 on a i686-pc-linux-gnu with:

    ./configure \
        --prefix="${prefix}"                    \
        --enable-shared                         \
        --enable-man-symlinks                   \
        --enable-man-compression=gzip           \
        --enable-threads                        \
        CFLAGS='-O3 -march=i686 -mtune=i686'


fails when "tdbc" is (sub)configured because the "unix/Makefile"
contains the following:

PKG_CFG_ARGS = CFLAGS="-O3 -march=i686 -mtune=i686" --prefix=/usr/local --enable-shared --disable-static --enable-man-symlinks --enable-man-compression=gzip --enable-threads CFLAGS=-O3 -march=i686 -mtune=i686 

that is CFLAGS is included twice and the second time it is
spliced without quotes.  Tcl itself is configured and built
correctly, only "tdbc" configuration fails.

The spliced CFLAGS comes from the line in "configure.in"
that includes $@.

My opinion is that changing the following line in "configure.in":

    eval 'test -n "$'$v'" && PKG_CFG_ARGS="$v=\"$'$v'\" $PKG_CFG_ARGS"'

will NOT work.  AFAICT there is no way to convince
AC_SUBST to keep quotes.  Why not use AC_CONFIG_SUBDIRS?
dgpplain2009-05-21 03:52:20
possibly related issue:

http://lists.alioth.debian.org/pipermail/pkg-tcltk-devel/2009-May/001127.html
dasplain2009-05-21 10:18:07
fixed on HEAD, by following commit:
    http://fisheye.categorifiedcoder.info/changelog/Tcl?cs=MAIN:das:20090103135509
just verified that passing a CFLAGS containing spaces as an arg to configure results in correct quoting in PKG_CFG_ARGS:
    ./configure -C --enable-threads --enable-framework --enable-dtrace --enable-symbols CC=gcc CFLAGS='-mmacosx-version-min=10.5  -arch ppc -arch ppc64 -arch i386 -arch x86_64'
results in
    PKG_CFG_ARGS= '-C' '--enable-threads' '--enable-framework' '--enable-dtrace' '--enable-symbols' 'CC=gcc' 'CFLAGS=-mmacosx-version-min=10.5  -arch ppc -arch ppc64 -arch i386 -arch x86_64'  --cache-file=../../config.cache

dgp: the linked debian issue is unrelated IMO, that is about non-overrideability of CFLAGS in unix/Makefile.in at make time, not configure time
Log in (anonymous is fine) to add a comment.