Commit Graph

96 Commits

Author SHA1 Message Date
nia 3be224989d qb.libs.sh: Use CFLAGS in header check. 2019-05-18 22:42:25 +01:00
Twinaphex b0bfe1c9be
Revert "qb.libs.sh: Use $CFLAGS when searching for header files and macros." 2019-05-18 19:00:01 +02:00
nia efcf6220b9 qb.libs.sh: Use $CFLAGS when searching for header files and macros.
Allows configuring with --enable-gl on systems with OpenGL outside the
standard compiler search path (assuming CFLAGS is set correctly...)
2019-05-18 17:17:59 +01:00
orbea 2586e727e7 qb: Fix the HAVE_OPENGLES check.
Not all systems have the appropriate pkgconfig files.

Fixes https://github.com/libretro/RetroArch/issues/8274
2019-02-13 09:51:49 -08:00
orbea 74cd5a067f qb: Use the correct compiler flags for check_lib. 2019-02-12 11:56:24 -08:00
orbea f41e70ba11 qb: Minor clean up. 2019-02-11 17:52:34 -08:00
orbea f6d8f2911d qb: Allow checking for multiple pkgconfig files. 2019-02-11 16:51:08 -08:00
orbea 769612c274 qb: Rework configure output. 2019-02-11 14:14:36 -08:00
orbea b5e7992579 qb: Test for user set variables.
This fixes issues where if both check_header and check_lib are used
it would set HAVE_FOO=yes and then result in a configure failure
when check_lib failed. This was also implemented for the other functions
to avoid similar issues.
2019-02-10 10:16:09 -08:00
orbea fe28192438 qb: Init some variables. 2019-02-08 12:43:58 -08:00
orbea 7cd6c9cf60 qb: Check number of arguments for while loops.
This is less fragile and doesn't rely on unset variables.
2019-02-08 12:15:47 -08:00
orbea 9d6b1c3ea7 qb: Add support for CXX_BUILD to config.params.sh. 2019-02-07 15:46:27 -08:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea f9ee57c40d qb: Fix configure arguments. 2019-01-31 13:06:12 -08:00
orbea c88456a455 qb: Combine HAVE_VIDEO_PROCESSOR with HAVE_VIDEOPROCCESOR. 2019-01-30 12:28:58 -08:00
orbea 921104a4fb qb: Don't force threads for win32. 2019-01-30 07:22:32 -08:00
orbea 8e798405ad qb: Extend check_enabled.
This also disables vulkan support when threads are also disabled.

Fixes https://github.com/libretro/RetroArch/issues/8091
2019-01-29 17:06:49 -08:00
orbea 1a28b06935 qb: Workaround mali bug.
Some systems have egl libarries, but no pkgconfig file to find them.

Fixes https://github.com/libretro/RetroArch/issues/8114
2019-01-29 10:16:06 -08:00
orbea d7d5bc58b2 qb: Create qb.init.sh. 2019-01-26 14:41:37 -08:00
orbea 63c7abef06 qb: Allow testing more than one version in check_pkgconf. 2019-01-25 15:04:29 -08:00
orbea 2cc6505997 qb: Fix HAVE_RETRO check. 2019-01-24 23:08:35 -08:00
orbea 0dc40a2d66 qb: Cleanup config.libs.sh. 2019-01-24 17:17:19 -08:00
orbea fb6fe1a87c Makefile: Better respect CFLAGS and CXXFLAGS as environment variables.
This fixes a few subtle problems with passing CFLAGS and CXXFLAGS as
environment variables for configure.

First it will now only add these variables to config.mk when they are
actually set. If they are unset then the default optimizations in the
Makefile are set. This avoids passing more than one conflicting
optimization level to the compiler.

Next all CFLAGS are added to CXXFLAGS to avoid issues with forgetting to
set both CFLAGS and CXXFLAGS. This results in the cxx compiler getting
passed several redundant optimization levels when both the CFLAGS and
CXXFLAGS environment variabls are used. Now these uses of CFLAGS in
Makefile.common are set to DEF_FLAGS. This allows adding $(DEF_FLAGS)
to the CXXFLAGS variable without adding redundant flags from CFLAGS.

v2: Update other build files.
2018-12-30 17:17:19 -08:00
orbea 7e4723e37a qb: Minor cleanup.
This uses safer quoting and removes an unneeded use of printf.

Fixes the following shellcheck warning.

In qb/qb.libs.sh line 143:
	if [ $3 ]; then
             ^-- SC2086: Double quote to prevent globbing and word splitting.

v2: Remove redundant conditional.
2018-12-21 08:32:01 -08:00
nia 1721bd07c4 Use the correct message when printing macro tests. 2018-12-21 14:23:13 +00:00
nia 3ef9bbb592 Add an AudioIO dirver for NetBSD and Solaris. 2018-12-21 14:15:30 +00:00
orbea 9be245ad75 qb: Extend check_header.
Now the check_header function can test any number of header files
instead of only four.
2018-12-14 19:16:20 -08: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 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