communi / libcommuni

A cross-platform IRC framework for Qt
https://communi.github.io
BSD 3-Clause "New" or "Revised" License
83 stars 37 forks source link

Configure: support passing qmake variables #13

Closed jpnurmi closed 11 years ago

jpnurmi commented 11 years ago

It should be possible to pass qmake variables such as QMAKE_CXXFLAGS and QMAKE_LFLAGS to the configure script.

qmake "QMAKE_CXXFLAGS+=-Wformat -Wformat-security -Werror=format-security" "QMAKE_LFLAGS+=-z relro -z now"

Ref: https://wiki.debian.org/Hardening

jpnurmi commented 11 years ago

I tried for a few hours, but I didn't manage to process/escape the arguments so that I could get

./configure -var "QMAKE_CXXFLAGS += -Wfoo -Wbar" -var "QMAKE_LFLAGS += -L/foo -lbar"

eventually translated to:

qmake "QMAKE_CXXFLAGS += -Wfoo -Wbar" "QMAKE_LFLAGS += -L/foo -lbar"

Looks trivial, but seems to be quite hard with Bourne Shell. :(