446 Commits

Author SHA1 Message Date
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
Dan Parsons
293c9c66b7 Updated inspircd init script template to make it chkconfig compatible.
Backported from master, PR #901
2014-11-12 22:44:57 +01:00
Attila Molnar
3a3ff94967 Merge insp20 2014-10-27 15:26:20 +01:00
Peter Powell
a49fd4cba6 Use gnutls_rnd instead of gcry_randomize on newer GnuTLS versions.
This is a modified version of 690c372. Fixes #905.
2014-10-25 02:57:51 +01:00
Peter Powell
d04979df09 Fix some small bugs in the makefile template.
- GCC in C++ mode should be called g++ not gcc.
- ICC in C++ mode should be called icpc not icc.
2014-10-24 23:34:41 +01:00
Peter Powell
6f65b7c6ca Add a workaround for compiling modules with Windows line endings. 2014-10-13 22:04:47 +01:00
Dan Parsons
84cfcdaf9e Updated inspircd init script template to make it chkconfig compatible. 2014-08-31 13:05:21 +02:00
Peter Powell
8258232b7b Fix unit-cc not loading configure cache when building files. 2014-08-27 22:01:54 +01:00
Peter Powell
4288b2a599 Add a work around for trampling over PKG_CONFIG_PATH.
The extend_pkg_path method will be removed in 2.2 as it
causes problems with non-standard pkg-config paths. This
commit adds a workaround until that happens.
2014-08-19 15:27:19 +01:00
Attila Molnar
f62654a685 Merge insp20 2014-07-25 12:05:40 +02:00
Peter Powell
f78c1c277a Add man pages. 2014-06-28 18:09:06 +02:00
Peter Powell
644e445ba4 Add systemd service file. 2014-06-28 18:09:06 +02:00
Peter Powell
1cf1f1fba9 Fix various small problems with configure.
- Fix temporary files not being deleted after use.
- Fix the option for disabling rpath.
- Fix the help message:
  * Fix indentation of some help options.
  * Fix default paths not containing 'run'.
  * Remove documentation for --disable-ipv6 (exists but does nothing).
  * Remove documentation for --library-dir (does not exist).
- Fix some minor errors in messages.
2014-06-26 10:53:45 +01:00
Peter Powell
e3bcf95ee9 Prefix all definitions in config.h to avoid potential collisions. 2014-05-23 14:13:51 +02: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
21487bc0ae Replace deprecated entry in launchd config with the modern equivalent. 2014-05-18 10:17:07 +01:00
Peter Powell
284925bed5 Backport questions from master's genssl tool. 2014-04-16 19:58:01 +01: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
050c2cf253 Integrate coremods into the build system 2014-03-05 16:28:29 +01:00
Attila Molnar
1fa541b76f Merge pull request #784 from ShutterQuick/patch-1
Fix build problem on Solaris
2014-02-28 17:16:29 +01:00
ShutterQuick
0a3b54f599 Fix build problem on Solaris
-rpath only takes one dash
Fixes the Solaris build \o/

'''
<fraggeln> SaberUK: http://m.theo.nu/jenkins/job/InspIRCd-2.0/435/label=solaris/console <--
<fraggeln> do you have any clue on why?
<@Shutter> Hmm. Where did that extra - come from.
<fraggeln> Shutter: no idea :)
[...]
<fraggeln> Shutter: sub make_rpath($;$) <-- in make/utilities.pm
<fraggeln> thats where that extra - is'''
2014-02-27 10:57:34 -08:00
Peter Powell
ea5093fec0 Fix Solaris not being able to find modules without pkg-config. 2014-02-27 17:05:08 +00:00
Peter Powell
1f63279777 Don't force a rebuild after doing a Git commit.
Thanks to w00t for pointing out the cause of this.
2014-02-06 18:27:08 +00:00
Peter Powell
b28bf791c2 Add a tool for running test builds. 2013-12-16 04:14:42 +00:00
Peter Powell
690c372f6e Use gnutls_rnd instead of gcry_randomize on newer GnuTLS versions.
Also, fix a bug where eval() caused compile errors.
2013-11-18 15:58:28 +00:00
attilamolnar
ba7431b4fd Hide all symbols that aren't exported explicitly
In addition to reducing the sizes of all binaries this also helps the optimizer
2013-09-08 17:21:37 +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
abc57eddfb Change modules to use the MODNAME constant when logging.
The majority of modules were logging with their module name as the
log type. There was a few places which were logging to a non-name
type but, with the exception of CONFIG, those messages are so
uncommon that it doesn't make sense to use a seperate type for
them.
2013-08-04 13:32:51 +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
240f34086a Rename CXXFLAGS to CORECXXFLAGS to respect users enviroment. 2013-07-04 17:55:23 +01:00
Peter Powell
8aff5d15d3 Use CXX instead of CC.
CXX is the correct variable to use as CC is the C compiler.
2013-07-04 17:51:33 +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
b37dfc9341 Remove 'make squeakyclean'.
This was a non-standard alias for make distclean.
2013-07-04 17:51:33 +01:00
Peter Powell
450e94945e Tidy up CXXFLAGS and LDFLAGS.
- Add -Iinclude at declaration instead of doing it later on.
- Add -Wextra -Wfatal-errors and -Wno-unused-parameter.
- Enable -Wall and -Wshadow on ICC.
- Remove -DPIC (useless).
- Remove empty declaration of LDFLAGS.
- Remove unneeded CXXFLAGS on Darwin.
2013-07-04 17:51:33 +01:00
Peter Powell
414d9f0b30 Remove support for Interix and SunOS from the Makefile.
- SunOS was replaced with Solaris in 1992(!).
- We have a native Windows port so Interix is not needed.
2013-07-04 17:51:33 +01:00
Peter Powell
8283b56440 Remove detection of deprecated backticks which was added in 1.1b9. 2013-07-04 15:51:10 +01:00
Daniel Vassdal
68462dad3f Made the launch script aware of --runasroot, so it does not drop privs if this is specified. 2013-06-28 12:50:09 +02:00
Peter Powell
7dfcffd685 Start to replace MAXBUF with <limits:maxline>. 2013-06-06 00:41:06 +01:00