Commit Graph

7 Commits

Author SHA1 Message Date
orbea
19e86a2b19 qb: Allow multi argument CC and CXX. 2020-01-13 09:41:14 -08:00
Bartłomiej Burdukiewicz
562bf11946 Fixed more compiler invokes in configure stage. 2020-01-07 15:38:15 +01:00
orbea
b427f44908 qb: Update configure checks to print the check before the result.
This is very helpful for debugging in case the check just exits or hangs
unexpectingly.
2019-11-01 09:02:01 -07:00
orbea
13cf3cdef2 qb: Refactor how config.h and config.mk are created.
This is a potential security issue.

The problem is that config.h and config.mk are populated with
all variables prefixed with 'HAVE_' from the user's environment.

Example:

  $ HAVE_FOO=yes ./configure
  $ grep FOO config.mk
  HAVE_FOO = 1
  $ grep FOO config.h
  #define HAVE_FOO 1

After this commit these files will only use variables set by
qb configure process and not from the user's environment. This
issue could result in hard to diagnose undefined behavior or
maybe worse?

The user should experience no change in behavior, but
developers should be more careful about setting 'HAVE_'
variables manually.

Unless the FOO variable is used by check_enabled ($2 only),
check_platform, check_lib, check_pkgconf, check_header,
check_macro or check_switch functions it should be set at
least once by the new add_opt function. The first argument
should be 'FOO' which matches the HAVE_FOO variable and the
second argument should contain 'auto', 'no' or 'yes'.

Example:

  add_opt FOO yes

When in doubt its safe to use add_opt. This will also fix a
few potential issues where configure arguments used by the
user are ignored.

When the second argument is not set the FOO variable will only
be used to populate config.h and config.mk with its current
value. This should only be done in qb/qb.libs.sh in functions
that set 'HAVE_' variables.
2019-07-28 07:59:41 -07:00
orbea
fe28192438 qb: Init some variables. 2019-02-08 12:43:58 -08:00
orbea
9c7affc2cf Travis + qb fixes. (#8040)
* travis: Enable building qt for linux.

* qb: Set QT_SELECT for moc and qtchooser.

This should have no effect on systems where qtchooser is not used.

Fixes https://github.com/libretro/RetroArch/issues/8028

* qb: Actually disable c++ features if there is no c++ compiler.

Now this warning actually does something.

  Warning: A working C++ compiler was not found, C++ features will be disabled.
2019-01-19 11:21:31 -05:00
orbea
e42c21321b qb: Create qb.moc.sh and qb.make.sh.
This moves the check for a Qt5 moc into its own file, qb.moc.sh which
is executed at the end of the script to avoid the direct dependency on
pkg-config. Now instead it depends on the QT5CORE_CFLAGS and
QT5CORE_LIBS variables set in config.lib.sh. These should always be set
if HAVE_QT=yes.

This also creates a new qb.make.sh file to ensure that the config.mk and
config.h files are created at the end of the configure script.
2019-01-17 18:36:03 -08:00