566 Commits

Author SHA1 Message Date
Peter Powell
64273cc51b Rename read_configure_cache to read_config_file and move to common. 2017-03-25 00:54:21 +00:00
Attila Molnar
b16bc08b2c Merge pull request #1273 from SaberUK/master+bs
Fix the clock_gettime() test on macOS Sierra
2016-12-29 16:05:19 +01:00
Peter Powell
032a1f8567 Add interactive-mode support for setting the compiler binary. 2016-12-26 05:57:34 +00:00
Peter Powell
27facf2e0c Fix the clock_gettime() test on macOS Sierra.
macOS now supports clock_gettime() but it is part of libSystem
rather than librt which does not exist on macOS.
2016-12-26 05:17:41 +00:00
Peter Powell
3ad1a0bad2 Fix the distribution label not showing up since b8d85c6251. 2016-11-18 18:13:47 +00:00
Peter Powell
1d45a7264c Update build system for the removal of . from @INC. 2016-11-08 09:31:56 +00:00
Peter Powell
806e57433a Rewrite the build system directive parser. 2016-09-16 04:23:56 +01:00
Peter Powell
b8d85c6251 Update stuff for the new versioning system. 2016-09-02 22:13:22 +02:00
Attila Molnar
c050eb2d45 Add mbedTLS SSL module 2016-06-15 18:23:04 +02:00
Peter Powell
8f9ae4c55e Fix the temporary fix for finding SSL libraries. 2016-02-19 20:01:13 +00: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
214c6bc525 Fix dodgy indentation in configure. 2015-03-08 22:04:32 +00:00
Peter Powell
1dc79dcdff Add development version checks to non-interactive mode. 2015-03-06 16:13:11 +00:00
Peter Powell
bdaccea960 Fix some oversights from #895.
- Always write the configure cache file as it is needed for updating
  the makefile when --update is called.
- List the modules which have been enabled in the "configuration
  complete" message.
- Silence some harmless warnings about installing PEM files which
  don't exist.
2014-12-18 16:43:58 +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
Attila Molnar
f71e6bf9cb Merge insp20 2014-04-07 13:40:51 +02:00
Attila Molnar
957676efd8 Fix typos and update text in the configure script
Some of these were picked from #448
2014-04-04 18:17:00 +02:00
Attila Molnar
ed6176383e Replace SocketEngine::GetName() with INSPIRCD_SOCKETENGINE_NAME define 2014-02-08 13:16:31 +01:00
Peter Powell
f12c97e3ff Fix $config{UID} being set incorrectly
Fixes issue #697 reported by @Nowaker
2013-12-15 17:02:15 +01:00
Peter Powell
4f79296bc0 Add a warning that the user is using a development version. 2013-12-13 10:39:22 +00:00
attilamolnar
39d34b6042 Fix a few problems
- Fix configuration issue on systems without both GnuTLS and OpenSSL. (@SaberUK)
- Do not set Membership::modes in ForceJoin() incorrectly to privs
- Fix crash when spanningtree detects a configuration error on load
2013-08-22 13:41:11 +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
22f013a06f Use the preprocessor to check for TCP deferring support. 2013-07-16 21:48:53 +01:00
Peter Powell
bac02a2800 Replace arguments for toggling socketengines with --socketengine. 2013-07-07 21:02:47 +01:00
Peter Powell
1b475afbe5 Expose compiler name to make.
- Convert ICC detection to use new variable.
2013-07-05 07:12:02 +01:00
Peter Powell
90a068af71 Rename configuration variable to CXX to match everything else. 2013-07-05 07:12:02 +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
0b4a12dc5f Add IFNEQ Makefile template macro.
- Use template macro for ICC check.
- Don't link against pthread on Darwin.
2013-07-04 17:51:33 +01:00
Peter Powell
9b29bedbc3 Fix some missing newlines in the config header generator. 2013-07-04 15:51:11 +01:00
Peter Powell
b68816b1fd Fix $ModDep failing to find application-wide include files. 2013-07-04 15:51:11 +01:00
Peter Powell
5d0b2b7cfc Remove hardcoded MAXBUF constant. 2013-06-06 01:45:05 +01:00
Peter Powell
7dfcffd685 Start to replace MAXBUF with <limits:maxline>. 2013-06-06 00:41:06 +01:00
attilamolnar
d9d99cd02d Merge insp20 2013-06-06 01:07:22 +02:00
attilamolnar
f4d8359382 Report the full GnuTLS version in configure
Fix incorrect version being reported when the minor version is longer than one digit (2.10.x)
2013-06-05 22:40:09 +02:00
Daniel Vassdal
263c2efd96 Added option for using TCP_DEFER_ACCEPT. Prevents the connection from being handed over to the daemon before data is ready from the client. 2013-06-03 18:45:46 +02: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
Peter Powell
11cafc12d5 Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
2013-04-12 17:03:05 +01:00