+our @ignoredeps = (
+ "inspircd_win32wrapper.h", # windows has its own configure program
+);
+
+# If you wish for all files in the entire core to have a given dependency, insert it here.
+# You should keep this to an absolute minimum to avoid rebuilds that are not neccessary.
+
+our @immutabledeps = (
+ "inspircd_config.h", # auto re-generated by configure
+ "inspircd.h",
+);
+
+###############################################################################################
+#
+# NON-EDITABLE VARIABLES
+#
+###############################################################################################
+
+# List of commands that make up 'make install' and 'make deinstall'
+
+our $install_list = "";
+our $uninstall_list = "";
+
+# This is a list of all files in the core. Each cpp file is mapped to a shared object file,
+# whos file extension is omitted (these can vary from system to system). Auto detected by
+# scanning the src/*.cpp files for files containing /* $Core: */ identifiers.
+
+our %filelist = ();
+
+# If you wish for a file to have special dependencies in the makefile, add an entry here.
+# Auto populated by /* $ExtraDeps: */ instruction
+
+our %specialdeps = ();
+
+# If you wish for a file to have extra make lines (in between the compile and link steps)
+# then insert them here.
+# Auto populated by /* $ExtraBuild: */ instruction
+
+our %extrabuildlines = ();
+
+# If you wish for a file to be linked against extra objects or arctives, insert them here.
+# Auto populated by /* $ExtraObjects: */ instruction
+
+our %extraobjects = ();
+
+# If you wish to compile extra cpp sources into an object, define them here.
+# NOTE: Certain cpp files such as the socket engines have a value auto calculated
+# for this table so that their derived class is built.
+# Auto populated by /* $ExtraSources: */ instruction
+
+our %extrasources = ();
+
+our ($opt_use_gnutls, $opt_rebuild, $opt_use_openssl, $opt_nointeractive, $opt_ports,
+ $opt_epoll, $opt_kqueue, $opt_noports, $opt_noepoll, $opt_nokqueue, $opt_disablerpath,
+ $opt_ipv6, $opt_ipv6links, $opt_noipv6links, $opt_maxbuf, $opt_disable_debug,
+ $opt_freebsd_port);
+
+our ($opt_cc, $opt_base_dir, $opt_config_dir, $opt_module_dir, $opt_binary_dir,
+ $opt_library_dir);
+
+sub list_extras ();
+
+sub enable_extras (@);
+
+sub disable_extras (@);
+
+my @opt_enableextras;
+my @opt_disableextras;
+
+GetOptions (
+ 'enable-gnutls' => \$opt_use_gnutls,
+ 'rebuild' => \$opt_rebuild,
+ 'enable-openssl' => \$opt_use_openssl,
+ 'disable-interactive' => \$opt_nointeractive,
+ 'enable-ports' => \$opt_ports,
+ 'enable-epoll' => \$opt_epoll,
+ 'enable-kqueue' => \$opt_kqueue,
+ 'disable-ports' => \$opt_noports,
+ 'disable-epoll' => \$opt_noepoll,
+ 'disable-kqueue' => \$opt_nokqueue,
+ 'disable-rpath' => \$opt_disablerpath,
+ 'enable-ipv6' => \$opt_ipv6,
+ 'enable-remote-ipv6' => \$opt_ipv6links,
+ 'disable-remote-ipv6' => \$opt_noipv6links,
+ 'with-cc=s' => \$opt_cc,
+ 'with-maxbuf=i' => \$opt_maxbuf,
+ 'enable-freebsd-ports-openssl' => \$opt_freebsd_port,
+ 'prefix=s' => \$opt_base_dir,
+ 'config-dir=s' => \$opt_config_dir,
+ 'module-dir=s' => \$opt_module_dir,
+ 'binary-dir=s' => \$opt_binary_dir,
+ 'library-dir=s' => \$opt_library_dir,
+ 'disable-debuginfo' => sub { $opt_disable_debug = 1 },
+ 'help' => sub { showhelp(); },
+ 'modupdate' => sub { modupdate(); },
+ 'update' => sub { update(); },
+ 'svnupdate' => sub { svnupdate(); },
+ 'clean' => sub { clean(); },
+ 'list-extras' => sub { list_extras; exit 0; }, # This, --enable-extras, and --disable-extras are for non-interactive managing.
+ 'enable-extras=s@' => \@opt_enableextras, # ^
+ 'disable-extras=s@' => \@opt_disableextras, # ^
+);
+
+if (scalar(@opt_enableextras) + scalar(@opt_disableextras) > 0) {
+ @opt_enableextras = split /,/, join(',', @opt_enableextras);
+ @opt_disableextras = split /,/, join(',', @opt_disableextras);
+ enable_extras(@opt_enableextras);
+ disable_extras(@opt_disableextras);
+ list_extras;
+ print "Remember: YOU are responsible for making sure any libraries needed have been installed!\n";
+ print "Run $0 -modupdate after you've done this to update the makefiles.\n";
+ exit 0;
+}
+
+our $non_interactive = (
+ (defined $opt_library_dir) ||
+ (defined $opt_base_dir) ||
+ (defined $opt_config_dir) ||
+ (defined $opt_module_dir) ||
+ (defined $opt_base_dir) ||
+ (defined $opt_binary_dir) ||
+ (defined $opt_nointeractive) ||
+ (defined $opt_cc) ||
+ (defined $opt_ipv6) ||
+ (defined $opt_ipv6links) ||
+ (defined $opt_noipv6links) ||
+ (defined $opt_kqueue) ||
+ (defined $opt_epoll) ||
+ (defined $opt_ports) ||
+ (defined $opt_use_openssl) ||
+ (defined $opt_nokqueue) ||
+ (defined $opt_noepoll) ||
+ (defined $opt_noports) ||
+ (defined $opt_maxbuf) ||
+ (defined $opt_use_gnutls) ||
+ (defined $opt_freebsd_port)
+);
+our $interactive = !$non_interactive;
+
+chomp(our $topdir = getcwd());
+our $this = resolve_directory($topdir); # PWD, Regardless.
+our @modlist = (); # Declare for Module List..
+our %config = (); # Initiate Configuration Hash..
+$config{ME} = resolve_directory($topdir); # Present Working Directory
+
+$config{BASE_DIR} = $config{ME};
+
+if (defined $opt_base_dir)
+{
+ $config{BASE_DIR} = $opt_base_dir;