Skip to content
Snippets Groups Projects
Commit bfe7a844 authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Adrien Béraud
Browse files

configure.ac: Do not set user variables.

The CFLAGS, CXXFLAGS, LDFLAGS and other variables intended to be
overridden by the user should not directly be set by the package.
This change uses one of the approaches recommended by the Autoconf and
Automake manuals, which is to use custom variables to accumulate flags
in the configure script and add them to the make targets they apply
to.  This has the benefit of not cluttering the flags used during the
Autoconf tests, which has proved problematic (see the previous commit
for a demonstration).

* configure.ac: Replace CFLAGS, CXXFLAGS, CPPFLAGS and LDFLAGS by
DAEMONCFLAGS, DAEMONCXXFLAGS, DAEMONCPPFLAGS and DAEMONLDFLAGS,
respectively.
Use these custom variables as the default values of AM_CFLAGS,
AM_CXXFLAGS, AM_CPPFLAGS and AM_LDFLAGS, respectively.  Remove an
extraneous check on jsoncpp.
* bin/Makefile.am (ringcli_CXXFLAGS): Honor the the AM_CXXFLAGS variable.
globals.mk: Extend rather than override the AM_CPPFLAGS variable.
* src/Makefile.am (libring_la_LDFLAGS): Honor AM_LDFLAGS.
(libring_la_CFLAGS): Honor AM_CFLAGS.
(libring_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/client/Makefile.am (libclient_la_CXXFLAGS): Honor AM_CXXFLAGS.
* src/im/Makefile.am (libim_la_CXXFLAGS): Remove variable.
* src/jamidht/Makefile.am (libringacc_la_CXXFLAGS): Likewise.
* src/media/audio/Makefile.am (libaudio_la_CXXFLAGS): Honor
AM_CXXFLAGS.
(libaudio_la_LDFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/audio/coreaudio/Makefile.am (libcoreaudiolayer_la_CXXFLAGS):
Likewise.
* src/media/video/Makefile.am (libvideo_la_CFLAGS): Honor the
AM_CFLAGS variable.
(libvideo_la_CXXFLAGS): Honor the AM_CXXFLAGS variable.
* src/media/video/v4l2/Makefile.am (AM_CXXFLAGS): Extend rather than
override.
* src/plugin/Makefile.am (libplugin_la_CXXFLAGS): Honor the
AM_CXXFLAGS variable.
* src/security/Makefile.am (libsecurity_la_CXXFLAGS): Likewise.
* src/sip/Makefile.am (libsiplink_la_CXXFLAGS): Likewise.
* src/upnp/Makefile.am (libupnpcontrol_la_CXXFLAGS): Remove variable.
* src/upnp/protocol/Makefile.am (libupnpprotocol_la_CXXFLAGS): Likewise.
* src/upnp/protocol/natpmp/Makefile.am (libnat_pmp_la_CXXFLAGS): Likewise.
* src/upnp/protocol/pupnp/Makefile.am (libpupnp_la_CXXFLAGS): Likewise.
* test/sip/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Extend rather than override.
* test/unitTest/Makefile.am (AM_CXXFLAGS, AM_LDFLAGS): Likewise.

GitLab: #487
Change-Id: I18be9d812159f8156efb9f7849e7eac6d4c6b3ca

squash! configure.ac: Do not set user variables.

Change-Id: I1146ea15d6fb75fe53d3cbdd782e981c933e82a6
parent 5cca2625
No related branches found
No related tags found
No related merge requests found
Showing
with 155 additions and 144 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment