Commit Graph

69 Commits

Author SHA1 Message Date
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 237a705a82 qb: Always print CC and CXX variables if set. 2018-05-01 17:47:14 -07:00
Brad Parker a1aefc901c Qt WIMP GUI 2018-04-30 14:33:05 -04:00
orbea b67bb87c8d qb: Add --datarootdir to configure.
This allows a user to use --datarootdir=PATH to configure the
share directory used for pixmaps, desktop files, man pages and assets.

By default this will be '/usr/local/share'. Assets and man page install
paths can still be configured with:
  --with-man_dir=PATH
and
  --with-assets_dir=PATH

Some operating systems like Haiku use unconventional install paths
and this should allow them to configure their build correctly.
2018-02-04 13:54:55 -08:00
orbea cc26f4a88c qb: Don't overwrite defaults
Haiku really should use the configure flags provided, that is why they exists.

In this case.

./configure \
  --global-config-dir=$PREFIX/settings
  --with-assets_dir=$PREFIX/data
  --with-mand_dir=$PREFIX/documentation/man

Changing the defaults just makes the script more complicated for no good reason.
2018-01-20 09:27:02 -08:00
kwyxz b9585df325 Update Haiku port to allow it to build again 2018-01-20 00:19:01 -08:00
orbea e2b003a993 qb: Only look in /opt/vc/include if $HAVE_VIDEOCORE=yes. 2018-01-02 09:40:36 -08:00
orbea 48982de355 qb: Improve build without pkg-config. 2018-01-02 09:40:36 -08:00
orbea a37d624967 qb: Improve the check_val function.
This accomplishes two things for the fallback path without pkg-config.

1. If --disable-foo is passed to configure it will explicitly skip
   check_val. This has the benefit of reducing checks in
   qb/config.libs.sh which are easy to break due to human error.

2. When a fallback path exists and --enable-foo is passed to configure,
   but fails due to the missing -lfoo check_val will now bail and print
   a configure error. However --enable-foo will still be ignored if
   there is no fallback path and pkg-config is not installed.

One issue with this is that if pkg-config is installed and the package
foo is not, it will still check if -lfoo works. As not all pkg-config
implemenations can be trusted to work even if they exist this seems
unavoidable.
2017-12-30 20:56:40 -08:00
orbea fadea3730f qb: Silence some shellcheck warnings. 2017-11-27 10:03:13 -08:00
orbea a78f72ccd3 qb: Used explicit word splitting to silence shellcheck warnings. 2017-11-26 19:08:56 -08:00
orbea 5361950d1c qb: Use printf and safer quoting in the check_pkgconf and check_header functions. 2017-11-26 14:19:29 -08:00
orbea 631f0c4a8b qb: Create a check_val function for the no pkg-config fallback path. 2017-11-25 17:42:41 -08:00
orbea fc5f04a762 qb: Define $2_LIBS in the check_lib function. 2017-11-25 15:27:01 -08:00
orbea e0eb2b8a31 qb: Add $PKG_CONF_USED to the check_lib function to help avoid undefined referenecs. 2017-11-25 13:52:52 -08:00
orbea bc4d14149a qb: Clean up empty defines in config.mk 2017-11-25 12:27:41 -08:00
orbea 892c6b864a qb: Combine the add_include_dirs and add_library_dirs functions 2017-11-24 10:22:57 -08:00
orbea cf45945aa8 qb: Combine the check_switch_c and check_switch_cxx functions. 2017-11-24 08:21:38 -08:00
orbea 0c9308cd87 qb: Remove unused and redundant check_code_c and check_code_cxx functions. 2017-11-24 08:21:38 -08:00
orbea fbbaf7d5b1 qb: Check which c language is being used in its own function. 2017-11-24 08:21:12 -08:00
orbea f952f392b8 qb: Use printf and better quoting in the check_lib function. 2017-11-24 07:16:33 -08:00
orbea 1ca43bd819 qb: Combine the add_define_header and add_define_make functions. 2017-11-23 18:36:19 -08:00
orbea 6351e21d9e qb: Turn $CONFIG_DEFINES from a temporary file into a variable. 2017-11-23 17:40:28 -08:00
Twinaphex 2d3aa5b917
Merge pull request #5760 from orbea/config.h
qb: Rewrite the create_config_header function to use printf instead of echo.
2017-11-24 02:21:12 +01:00
orbea 2fb0cb79ec qb: Turn $MAKEFILE_DEFINES from a temporary file into a variable. 2017-11-23 14:53:39 -08:00
orbea ca534ffa56 qb: Rewrite the create_config_header function to use printf instead of echo. 2017-11-23 14:07:37 -08:00
orbea d3139754bc qb: Rewrite the create_config_make function to use printf instead of echo. 2017-11-23 10:30:59 -08:00
orbea 8ab308d9dd qb: Honor the --build option.
This makes some distros happy even if it does nothing.
2017-11-22 15:40:15 -08:00
orbea bf8863d360 qb: Add a function to print warning or exit messages. 2017-11-18 02:54:58 -08:00
orbea f2d70664a3 qb: Better use of rm. 2017-11-06 07:25:04 -08:00
orbea 10722920ed qb: Remove old commented code.
'echo -n' is not portable and should not be used even if it works on osx.
'printf' would be far preferable, but there really isn't any need.
2017-11-05 18:44:45 -08:00
orbea 595e69d34d Fix https://github.com/libretro/RetroArch/issues/5636 2017-11-01 11:32:41 -07:00
orbea 48db41a112 qb: Combine the check_lib and check_lib_cxx functions. 2017-10-27 14:53:24 -07:00
orbea e12d203a76 qb: Avoid using 'true' which could be a binary on some systems. 2017-10-24 12:43:40 -07:00
orbea 79ee19e2a5 qb: Clean up long lines in check_lib and check_lib_cxx 2017-10-21 14:49:26 -07:00
orbea b733807099 qb: Remove trailing white spaces from config.mk. 2017-10-21 14:49:26 -07:00
orbea 0ff7e829f0 qb: Explicitly word split libs and extralibs 2017-10-21 14:49:26 -07:00
orbea 514391b4d8 qb: Remove the leading whitespace from $INCLUDE_DIRS and $LIBRARY_DIRS. 2017-10-21 14:49:26 -07:00
orbea f50d755b45 qb: Don't use variables in the printf format string. 2017-10-18 16:05:09 -07:00
Alcaro 39ad441698 XShm detector works now. 2015-10-11 16:06:44 +02:00
Alcaro 40ca0baa07 Allow defining libraries as C89 incompatible in qb/config.params.sh. 2015-09-22 16:40:07 +02:00
Higor Eurípedes d3abc809c7 (qb) Fix for PKG_CONF_PATH=none 2015-04-19 10:56:57 -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 ac91f46c3e (qb) Display pkg-config module version 2015-04-19 08:34:37 -03:00
Geoffrey Plitt 6e437c449b Mac OS X / CircleCI fixes
adding artifact step

installing Cg

curl instead of wget

specifying the xcodeproject path

fixing path

troubleshooting

adding configure step

fixing configure step

adding submodule fetch step

disabling artifact step

using zip to upload just one file to artifacts

fine tuning build.zip

bugfix

undoing whitespace changes

fixing zip step
2015-03-06 14:04:21 -08:00
Higor Eurípedes 7a9cd53f15 (qb) Add header argument to check_lib 2014-10-28 22:30:29 -02:00
Higor Eurípedes 8620cef48a (qb) Prefix the pkg-config path with $CROSS_COMPILE 2014-09-16 16:48:08 -03:00
Higor Eurípedes ef4b720c74 (qb) Check for windres 2014-09-14 17:50:50 -03:00
Higor Eurípedes f5a849216e (qb) Always call the correct pkg-config 2014-08-29 12:36:13 -03:00
Themaister 247059ad4d Use PKG_CONF_PATH in qb/. 2014-06-05 11:09:10 +02:00