150 Commits

Author SHA1 Message Date
Sadie Powell
56375392ba Update my name and email address. 2019-12-31 20:55:17 +01:00
Sadie Powell
8848169e8b Merge branch 'insp3' into master. 2019-09-23 00:37:33 +01:00
Peter Powell
1cf76f8aae Respect indentation in configure template declarations. 2019-09-07 12:54:29 +01:00
Sadie Powell
cd8b456f97 Merge branch 'insp3' into master. 2019-07-16 16:48:18 +01:00
Peter Powell
021fe61d85 Document the --example-dir option. 2019-07-05 10:09:06 +01:00
Sadie Powell
1d5b18de82 Merge branch 'insp3' into master. 2019-05-15 15:26:55 +01:00
Peter Powell
a55ca00569 Document the --disable-auto-extras configure option. 2019-05-15 10:58:45 +01:00
Sadie Powell
bfa5fb407e Merge branch 'insp3' into master. 2019-02-05 00:47:30 +00:00
Sadie Powell
9828a06514 Switch the build system to use C++14. 2019-01-25 02:46:43 +00:00
Peter Powell
961109ae4f Remove trailing whitespace from various source files. 2019-01-24 22:18:22 +00:00
Peter Powell
479d0d9de4 Avoid using relative paths in make::configure. 2018-10-04 14:17:02 +02:00
Peter Powell
4743b23e5c Remove INSPIRCD_SOCKETENGINE_NAME and INSPIRCD_SYSTEM.
- INSPIRCD_SOCKETENGINE_NAME is not really something that needs to
  be user facing. If opers want to know this kind of internal info
  then they can look at the build configuration.

- INSPIRCD_SYSTEM causes problems for reproducible builds and is
  only accurate for the state of the system when InspIRCd is built
  which is not useful in the slightest.
2017-10-15 11:57:05 +01:00
Peter Powell
b8babf2c43 Move the init scripts out of the prefix into the new script dir.
The previous directory was okay for home directory installs but
was problematic for system wide installs.
2017-09-21 20:49:49 +01:00
Peter Powell
bb9db07c21 Remove support for building with BSD Make.
BSD users should install GNU Make to build InspIRCd.
2017-07-24 17:00:05 +01:00
Peter Powell
3cf2dd8247 Remove use of global barewords in most file handling code.
This is not considered good practise in modern Perl code.

A few cases of this still remain in code which is due to be
rewritten anyway.
2017-07-11 17:37:20 +01:00
Peter Powell
7e1629bdf1 Switch compiler detection to use a more reliable method.
Its clear that parsing version output is not reliable enough so
switch to using a method which is less likely to break.
2017-04-14 14:59:03 +01:00
Peter Powell
c185edf71c Extract core logic of write_configure_cache to write_config_file. 2017-03-25 00:54:25 +00:00
Peter Powell
64273cc51b Rename read_configure_cache to read_config_file and move to common. 2017-03-25 00:54:21 +00:00
Peter Powell
62aa553563 Don't suppress error output when INSPIRCD_VERBOSE is set. 2016-12-26 05:07:40 +00:00
Peter Powell
3ad1a0bad2 Fix the distribution label not showing up since b8d85c6251. 2016-11-18 18:13:47 +00:00
Peter Powell
806e57433a Rewrite the build system directive parser. 2016-09-16 04:23:56 +01:00
Peter Powell
c0ec56e9c7 Fix "use of uninitialized value $key in hash element" error. 2016-04-04 13:51:32 +01:00
Peter Powell
79f207e729 Simplify the configure cache file format.
This prevents the need to implement escaping of values which was
a bug in the previous format.
2016-03-22 23:39:14 +00:00
Peter Powell
37d939829b Move the configure cache to the .configure directory too. 2016-03-22 23:39:03 +00:00
Peter Powell
f79a55616b Write generated templates to the .configure directory. 2016-03-22 23:38:44 +00:00
Peter Powell
fb58d69bf5 Fix a typo in parse_templates. 2016-03-22 23:38:43 +00:00
Peter Powell
cd67a0a6f9 Fix detection of the Apple variant of Clang.
This splitting of compiler names mirrors the change implemented by
other build systems like cmake.
2015-09-23 21:52:27 +01:00
Peter Powell
aae283e1dd Convert the build system to Perl 5.10.
Thanks to Kross for the heads up on "use feature".
2015-03-25 19:01:33 +00:00
Peter Powell
cfff1874a8 Change server name in ./configure --help to use the alias.
Requested by @attilamolnar.
2015-03-06 16:37:52 +00:00
Peter Powell
100048eb41 Add the <type_traits> header to the compiler test file. 2015-02-18 15:46:13 +00:00
Peter Powell
4e9af81504 Improve compiler detection in configure.
- Split the detection and compatibility checks into two different
  steps (previously it was confusing as it would say the compiler
  was not available when it was really not compatible).
- Fix a minor bug where compilers detected using xcrun on Darwin
  would not have xcrun returned as part of the compiler name from
  find_compiler.
2015-02-18 15:16:40 +00:00
Peter Powell
7404ba8b66 Move common code to make::common from make::utilities.
The other code in that file will be removed very soon so it has
been left alone to avoid merge conflicts.

This will help prevent insp20 merge conflicts in the future.
2014-12-07 22:36:43 +00:00
Peter Powell
541a66de7a Implement support for distribution specific version labels.
This will help us determine whether a version has been packaged by
a downstream distribution who quite often make arbitrary changes
which are a pain to provide support for.

Debian, we're looking at you.
2014-12-07 22:36:42 +00:00
Peter Powell
2adb94db30 Improve build system compiler detection.
- Check the CXX environment variable inside find_compiler instead
  of doing it separately.
- Use a test file instead of checking for version output. This
  ensures we are using a working compiler.
- Pipe the output through run_test which makes debugging problems
  considerably easier.
- Detect Xcode versions of Clang properly by returning the LLVM
  version number instead of the Xcode one.
2014-12-07 22:36:42 +00:00
Peter Powell
133b110534 Improve configure cache file handling.
- Add a version number to the configure cache file.
- Disable configure cache file in non-interactive mode.
- Rename configure cache file to .configure.cache to avoid 2.0 files.
- Use run_test to produce the "reading .configure.cache" message.
2014-12-07 22:36:42 +00:00
Peter Powell
500a0524d9 Miscellaneous improvements to configure.
- Clean up various minor sections of the code.
- Remove OpenSSL and GnuTLS detection plumbing.
  - This will soon be the job of modulemanager.
  - This did not work in non-interactive mode unlike --enable-extras.
- Rework runas user handling.
  - Add the --gid configure option.
  - Accept either an id or a name in --gid and --uid.
- Rework the question flow in interactive mode.
  - User is no longer asked detailed questions unless they want them.
  - Socket engine questions have been removed.
- Automatically enable non-interactive mode if STDIN or STDOUT are not
  a tty.
2014-12-07 22:36:42 +00:00
Peter Powell
11f4d02e70 Add Perl module for console related code.
- Move prompt_* methods to this module.
- Add methods for printing errors and warnings easily.
- Add colour code helpers and switch all code to use them.
2014-12-07 22:36:42 +00:00
Peter Powell
e6d245a3e8 Replace the configure templating system with something better.
A large amount of this code can be removed when buildtool is done
as we will not need to worry about the differences between BSD and
GNU Make.
2014-05-23 14:13:51 +02:00
Peter Powell
2803ae5d75 Remove various broken/useless features from the build system.
- Removed support for changing the build directory using configure.
  This can still be set using make BUILDPATH=foo.
- Removed support for SPLIT_CC builds. This is not documented
  anywhere and is quite useless as it doesn't work.
- Remove STARTSCRIPT from configure; always install the perl
  helper.
2014-04-11 15:38:17 +02:00
Peter Powell
3070548cee Clean up and move various subroutines.
- Fix indentation of get_compiler_info and clean up slightly.
- Move module_installed to make::utilities.
- Remove promptnumeric (unused).
- Rename clean to cmd_clean and rewrite.
- Rename dir_check to prompt_bool and rewrite.
- Rename dumphash to dump_hash.
- Rename getcache to read_configure_cache and rewrite.
- Rename getrevision to get_revision.
- Rename makecache to write_configure_cache and rewrite.
- Rename promptstring_s to prompt_string and rewrite.
- Rename showhelp to cmd_help and rewrite.
- Rename update to cmd_update and rewrite.
- Rename yesno to prompt_bool and rewrite.
- Replace getmodules with a <src/modules/m_*.cpp> glob.
2013-08-18 11:41:43 +01:00
Peter Powell
b86fe63a3a Clean up the build system properties and related code.
- Deduplicate getcompilerflags, getdependancies, getlinkerflags.
- Remove $NoPedantic (add -Wno-pedantic to $CompileFlags instead).
- Remove --enable-freebsd-ports-openssl and all related code (this
  will be replaced with --no-pkg-config=[name] in the future).
- Remove some unused build system properties.
- Remove support for caching third party include and library paths
  (can cause unexpected problems when they change).
2013-08-16 00:35:34 +01:00
Peter Powell
ff15b6d2ad Refactor duplicate test code into a run_test subroutine. 2013-08-04 17:48:49 +01:00
Peter Powell
b4ba01f542 Remove a ton of duplicate and obsolete code from configure.
- Add the data and log paths to dumphash.
- Always exit with EXIT_FAILURE on error.
- Always replace the old config.h with our new one.
- Clean up the ./configure --help message slightly.
- Install dhparams.pem into the conf directory on GnuTLS as well as
  OpenSSL.
- Only show the users InspIRCd Git revision when building from Git.
- Remove a check for MinGW (we have proper Windows builds).
- Remove a check for FreeBSD 4 (released in 2000).
- Remove a ton of pointless tab-indented comments.
- Remove a ton of duplicate or unused variables.
- Remove the check for stdint.h (always available on TR1 compilers).
- Remove the $writeheader argument from writefiles (always 1).
- Remove the following %config options:
    - DESTINATION (not used, always set to BASE).
    - EXECUTABLE (always set to inspircd).
    - OSNAME (duplicate of SYSTEM).
- Remove support for checking whether -extra modules are up to
  date (if the user is installing they won't have any -extra
  modules installed).
- Remove SSL generation messages (genssl provides these).
- Replace inappropriate uses of printf with print.
- Replace is_dir with -d from the Perl stdlib.
- Replace resolve_directory with rel2abs from the Perl stdlib.
- Rewrite getrevision to be more compact, cache the revision and
  return 'release' on non-Git builds.
- Use consistent messages for all tests.
- Use tput to clear the screen in a portable way.
2013-07-29 03:33:46 +01:00
Peter Powell
bac02a2800 Replace arguments for toggling socketengines with --socketengine. 2013-07-07 21:02:47 +01:00
Peter Powell
77a08e490c Correctly detect the compiler version and whether it is acceptable. 2013-07-05 07:12:02 +01:00
Peter Powell
2677d12f20 Automatically detect the compiler which the user has installed. 2013-07-05 07:12:02 +01:00
Peter Powell
f52123b1ed Purge --with-cc in favour of the CXX environment variable. 2013-07-05 07:12:02 +01:00
Peter Powell
7dfcffd685 Start to replace MAXBUF with <limits:maxline>. 2013-06-06 00:41:06 +01:00
Peter Powell
d9c1809b26 Remove unused code from configure. 2013-06-01 20:33:13 +01:00
Peter Powell
a9ca786a6a Improve feature detection in configure. 2013-05-16 14:34:07 +01:00