Commit Graph

55 Commits

Author SHA1 Message Date
orbea
98b04b99dc qb: Remove deprecated arguments.
Please use --bindir, --mandir and --sysconfdir now.
2019-10-31 22:53:52 -07:00
orbea
91f486b255 qb: Clean up. 2019-07-29 07:24:10 -07:00
orbea
93e3248949 qb: Retain HAVE_NO variables.
Fixes a small oversight, nothing is using this code anyways so
I didn't notice at first.
2019-07-28 08:00:22 -07:00
orbea
59cb198dda qb: Make sure CONFIG_OPTS only contains HAVE_ variables. 2019-07-28 07:59:41 -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
Twinaphex
b3d3f2db58
Merge pull request #8781 from orbea/haiku
qb: Add check_platform.
2019-06-02 18:10:19 +02:00
orbea
8922e96869 qb: Add check_platform.
This allows enabling and disabling features for platforms
more robustly.

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

v2: Fix D3D configure checks.
v3: Cleanup.
v4: Update Makefile.msvc and Makefile.win
2019-06-02 08:48:05 -07:00
orbea
fbe6639ee1 qb: Log the configure arguments in config.log. 2019-06-02 07:04:56 -07: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
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
d7d5bc58b2 qb: Create qb.init.sh. 2019-01-26 14:41:37 -08:00
orbea
cf83332b49 qb: Replace remaining uses of echo with printf. 2019-01-20 08:08:02 -08:00
orbea
72a02b7647 qb: Add --sysconfdir
This also deprecates --global-config-dir.
2018-02-11 09:54:57 -08:00
orbea
85e4f5d94d qb: Add --docdir
By default 'make install' will now install the following 2-3 files
to $(DESTDIR)$(SHARE_DIR)/doc/retroarch which by default is
/usr/local/share/doc/retroarch.

COPYING
README.md

and if media/assets exists it will install:

media/assets/COPYING to COPYING.assets

Users will be able to configure this install path with.

./configure --docdir=PATH

For example:

./configure --docdir=/usr/doc/RetroArch-1.7.0
2018-02-10 08:55:54 -08:00
orbea
72ff4c4d44 qb: Add --bindir and --mandir.
This also deprecates --with-bin_dir and --with-man_dir.
2018-02-08 12:01:28 -08: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
e82502f80a qb: Document syntax better. 2017-11-22 15:52:57 -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
Alcaro
f0becad9d9 Document this one's syntax 2017-11-22 23:46:23 +01:00
orbea
6dc32ffe17 qb: Don't set IFS. 2017-11-18 14:51:53 -08:00
orbea
bf8863d360 qb: Add a function to print warning or exit messages. 2017-11-18 02:54:58 -08:00
Twinaphex
29b5e09b24
Merge pull request #5702 from orbea/zsh
qb: Fix --enable-* options for zsh.
2017-11-18 10:53:17 +01:00
orbea
21ae4a29a1 qb: Fix --enable-* options for zsh. 2017-11-18 01:21:29 -08:00
orbea
75e6ad53b6 qb: read without -r will mangle backslashes. 2017-11-17 18:42:49 -08:00
orbea
e12d203a76 qb: Avoid using 'true' which could be a binary on some systems. 2017-10-24 12:43:40 -07:00
orbea
86bb116625 qb: Fix alignment in ./configure --help. 2017-10-24 09:24:56 -07:00
orbea
2b939ab40b qb: Use POSIX character classes instead of character ranges. 2017-10-23 21:48:37 -07:00
Brad Parker
99508cfd64 allow --disable-vulkan on Windows 2017-01-16 15:08:05 -05:00
orbea
cca3e2a433 Label -with-* options as config for ./configure --help 2016-08-27 17:06:50 -07:00
orbea
da4afd6e35 Give more space for configure help options 2016-08-27 16:49:09 -07:00
gouchi
0b8afdd5b4 Adding more space 2016-03-21 00:12:56 +01:00
gouchi
05d5e8b7dd Fix inconsistency with parameters 2016-03-20 23:51:07 +01:00
Alcaro
92251dcecb Get the C89 support flags out of ./configure --help. 2016-01-29 18:57:24 +01:00
Alcaro
d86bda1ebd Tell which option is unknown. 2016-01-29 00:49:12 +01:00
Higor Eurípedes
c0da331aa2 (qb) Align help text 2015-06-17 13:06:30 -03:00
Themaister
a39b64e443 Fix multiword --with- arguments. 2014-06-05 11:45:56 +02:00
Themaister
6a96909a2e Allow custom cflags/libs for GLES.
Useful for some embedded platforms.
2013-12-13 17:55:30 +01:00
twinaphex
b23379266c PACKAGE_VERSION is defined now in general.h for all versions 2013-07-19 16:20:14 +02:00
Yohann Bianchi
cdfa97a41e Fixes issues pointed by Themaister
configure option is now --global-config-dir
2013-05-28 01:59:06 +02:00
Yohann Bianchi
937b112e71 Adds --config-dir option in configure script to let the user set a custom path for system wide config file 2013-05-27 17:58:59 +02: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
652f4c5856 More explicit checking for inconsistency. 2011-11-02 16:54:45 +01:00
Themaister
77cf9423cc Abolish use of echo -n as it isn't perfectly standard. 2011-06-25 14:10:40 +02:00
Themaister
0f1a76f932 POSIX stuff for Quickbuild. 2011-06-15 04:34:28 +02:00