Commit Graph

52 Commits

Author SHA1 Message Date
orbea dd2c9c911b qb: Don't set cc_works in test_compiler. 2020-01-15 09:23:49 -08:00
orbea 19e86a2b19 qb: Allow multi argument CC and CXX. 2020-01-13 09:41:14 -08:00
Bartłomiej Burdukiewicz 4ca5af4ac9 Fixed compiler invoke in configure stage. 2020-01-04 18:27:58 +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 98de418b7a qb: Improve the windres check. 2019-11-01 09:01:38 -07:00
orbea 8fc4a788e1 qb: Make the pkgconfig check more simple pt. 2: 2019-11-01 08:38:52 -07:00
orbea 14e159decf qb: Make the pkgconfig check more simple. 2019-10-31 22:36:04 -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 cf83332b49 qb: Replace remaining uses of echo with printf. 2019-01-20 08:08:02 -08: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
orbea 2860d6af08 qb: Check for a Qt5 moc. (#8029) 2019-01-17 17:35:19 -05:00
orbea 8f861d438b qb: Fix checking the CXX compiler
This does the following.

1. Fixes checking if the CXX compiler works on platforms other than windows.
2. Turns the error when the CXX compiler is missing or doesn't work into a warning.
3. Adds HAVE_CC and HAVE_CXX.
4. Only adds CC and CXX to config.mk when HAVE_CC or HAVE_CXX are true.
5. Disables Qt companion, Vulkan, CXX_BUILD and NEED_CXX_LINKER if HAVE_CXX is false.
6. Explicitly errors when the CXX compiler is broken or missing and Qt or vulkan support is enabled.
7. No longer explicitly links with the CXX compiler on windows since this should no longer be needed.

This also adds the function `check_enabled` to `qb/qb.lib.sh` which
can be used to dynamically disable any libraries that require C++
support.
2018-05-03 12:24:32 -07:00
orbea b2f508d72e qb: Improve moc detection (#6680) 2018-05-01 13:40:42 -04:00
Brad Parker 6639d0ed89 qb: don't fail if moc is missing 2018-05-01 08:51:57 -07:00
Brad Parker 791aaa00e1 qb: detect Qt automatically 2018-04-30 22:11:55 -07:00
Brad Parker a1aefc901c Qt WIMP GUI 2018-04-30 14:33:05 -04:00
orbea 51dfbd98b1 qb: Prefer pkgconf over the legacy GNU pkg-config. 2017-11-24 12:12:56 -08:00
orbea 06f10d1368 qb: Clean up qb.comp.sh 2017-11-24 12:12:56 -08:00
orbea b744f2a2c9 qb: Add a function to find executables in the $PATH 2017-11-20 22:06:50 -08:00
orbea bf8863d360 qb: Add a function to print warning or exit messages. 2017-11-18 02:54:58 -08:00
orbea 08dcac4b02 qb: Remove redundant variables. 2017-10-24 15:39:19 -07:00
orbea cca4a25757 qb: path is a special variable in zsh so avoid setting it. 2017-10-21 14:49:26 -07:00
orbea 40070e2c93 qb: Find working compilers with zsh. 2017-10-21 14:49:26 -07:00
twinaphex 6213b9d3f1 Revert "Force HAVE_VULKAN on for Windows"
This reverts commit 1f8b4d6b9a.
2016-05-30 00:40:16 +02:00
twinaphex 1f8b4d6b9a Force HAVE_VULKAN on for Windows 2016-05-30 00:34:18 +02:00
Higor Eurípedes d49c353957 (qb) Fix comparison operator 2015-06-17 14:31:20 -03:00
Higor Eurípedes 6aad66cfc8 (qb) Fix CC/CXX conditional 2015-06-17 10:21:55 -03:00
Higor Eurípedes 54240500f0 (qb) Add qb.system.sh 2015-06-16 20:46:11 -03:00
Higor Eurípedes 51d7bc89c3 (qb) Cleanup 2015-06-16 20:45:35 -03:00
Higor Eurípedes da770010ec (qb) Cleanup 2015-06-16 20:40:25 -03:00
Higor Eurípedes d3abc809c7 (qb) Fix for PKG_CONF_PATH=none 2015-04-19 10:56:57 -03:00
Higor Eurípedes e2b182befb (qb) Always warn about missing pkg-config 2015-04-19 09:52:18 -03:00
Higor Eurípedes 7c9154c181 (qb) Do not abort on missing pkg-config under Darwin 2015-04-19 09:47:20 -03:00
Higor Eurípedes 729b32a579 (qb) Display user distribution 2015-04-19 08:53:09 -03:00
Higor Eurípedes 72404e29dd (qb) Fix OS detection under MinGW 2014-10-28 21:27:14 -02:00
Higor Eurípedes 5ba8cbb5ef (qb) Fix OS detection under msys2 2014-09-17 17:37:39 -03:00
Higor Eurípedes 600af88507 (qb) Make $CROSS_COMPILE affect target OS detection 2014-09-16 16:48:08 -03:00
Higor Eurípedes ef4b720c74 (qb) Check for windres 2014-09-14 17:50:50 -03:00
Themaister 2ea68714f6 Fix indent. 2014-06-19 23:32:12 +02:00
Themaister 41e0a5204b If CC or CXX are set explicitly, skip checks. 2014-06-19 23:31:33 +02:00
Themaister 5c1c45750e Add clang and clang++ to qb autodetect. 2014-06-19 10:12:57 +02:00
sparklewind 1f8bef7eeb Update qb/qb.comp.sh 2012-12-22 20:49:49 +01:00
notaz 7d283ab48d Add basic cross-compilation support.
Supports both autotools-like --host=... switch and Linux kernel-style
CROSS_COMPILE env var.
2012-12-09 18:29:45 +02:00
tukuyomi ae33d8c899 Refactored quickbuild. 2012-06-13 20:46:56 +02:00
tukuyomi d7c16c7b30 Greatly clean up quickbuild's handling of parameters. 2012-06-02 22:11:39 +02:00
Themaister 59c92dddc3 Slight QB cleanup. 2011-06-25 17:11:18 +02:00
Themaister 77cf9423cc Abolish use of echo -n as it isn't perfectly standard. 2011-06-25 14:10:40 +02:00
Themaister 60b94bbe43 Add some additional checks in qb. 2011-06-25 13:57:46 +02:00
Themaister bdea56370d Typo 2011-02-07 11:14:46 +01:00