Преглед изворни кода

* Finished removing modconfig

svn: 646
Bryan Drewery пре 22 година
родитељ
комит
9f7b274c63
6 измењених фајлова са 4 додато и 574 уклоњено
  1. 0 1
      autotools/configure.ac
  2. 0 12
      autotools/includes/acinclude.m4
  3. 1 11
      configure
  4. 0 541
      misc/modconfig
  5. 3 3
      src/mod/dns.mod/configure.in
  6. 0 6
      src/mod/eggmod.m4

+ 0 - 1
autotools/configure.ac

@@ -199,7 +199,6 @@ AC_CACHE_SAVE
 EGG_SUBST_VERSION
 DO_PACK_CFG
 EGG_SUBST_MOD_UPDIR
-EGG_CATCH_MAKEFILE_REBUILD
 DO_DEPS
 
 AC_CONFIG_FILES([Makefile src/Makefile src/compat/Makefile src/mod/Makefile])

+ 0 - 12
autotools/includes/acinclude.m4

@@ -1154,18 +1154,6 @@ EOF
 ])
 
 
-dnl EGG_CATCH_MAKEFILE_REBUILD()
-AC_DEFUN([EGG_CATCH_MAKEFILE_REBUILD],
-[
-  AC_CONFIG_COMMANDS([catch-make-rebuild],
-  [[
-    if test -f .modules; then
-      $srcdir/misc/modconfig --top_srcdir="$srcdir/src" Makefile
-    fi
-  ]])
-])
-
-
 dnl  EGG_SAVE_PARAMETERS()
 dnl
 AC_DEFUN(EGG_SAVE_PARAMETERS, [dnl

+ 1 - 11
configure

@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.7 .
+# From configure.ac Revision: 1.8 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -12348,10 +12348,6 @@ case "$srcdir" in
 esac
 
 
-            ac_config_commands="$ac_config_commands catch-make-rebuild"
-
-
-
 files="src/Makefile.in src/compat/Makefile.in src/mod/channels.mod/Makefile src/mod/compress.mod/Makefile src/mod/console.mod/Makefile src/mod/ctcp.mod/Makefile src/mod/dns.mod/Makefile.in src/mod/irc.mod/Makefile src/mod/notes.mod/Makefile src/mod/server.mod/Makefile src/mod/share.mod/Makefile src/mod/transfer.mod/Makefile src/mod/update.mod/Makefile"
 for mf in $files; do
   # Strip MF so we end up with the name of the file.
@@ -12940,7 +12936,6 @@ do
   "src/compat/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;;
   "src/mod/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/mod/Makefile" ;;
   "replace-if-changed" ) CONFIG_COMMANDS="$CONFIG_COMMANDS replace-if-changed" ;;
-  "catch-make-rebuild" ) CONFIG_COMMANDS="$CONFIG_COMMANDS catch-make-rebuild" ;;
   "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -13651,11 +13646,6 @@ EOF
     fi
     rm -f conftest.out
    ;;
-    catch-make-rebuild )
-    if test -f .modules; then
-      $srcdir/misc/modconfig --top_srcdir="$srcdir/src" Makefile
-    fi
-   ;;
   esac
 done
 _ACEOF

+ 0 - 541
misc/modconfig

@@ -1,541 +0,0 @@
-#! /bin/sh
-#
-# modconfig
-#
-# Copyright (C) 2000, 2001, 2002 Eggheads Development Team
-# Written by Fabian Knittel
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-
-
-mc_pn=`echo $0 | sed -e 's/^.*\///'`
-mc_top_srcdir=
-mc_srcdir=
-mc_bindir=.
-
-mc_flag_quiet=yes
-mc_flag_onlynew=no
-
-
-#  Read options
-while true; do
-	case ${1} in
-	--top_srcdir=*)
-		mc_top_srcdir=`echo ${1} | sed -e 's/^--top_srcdir=//'`
-	;;
-	--top_srcdir)
-		shift
-		mc_top_srcdir=${1}
-	;;
-	--srcdir=*)
-		mc_srcdir=`echo ${1} | sed -e 's/^--srcdir=//'`
-	;;
-	--srcdir)
-		shift
-		mc_srcdir=${1}
-	;;
-	--bindir=*)
-		mc_bindir=`echo ${1} | sed -e 's/^--bindir=//'`
-	;;
-	--bindir)
-		shift
-		mc_bindir=${1}
-	;;
-	--quiet|-q)
-		mc_flag_quiet=yes
-	;;
-	--only-new|-n)
-		mc_flag_onlynew=yes
-	;;
-	--*)
-		echo "${mc_pn}: warning: unknown option \`${1}'." 2>&1
-	;;
-	*)
-		#  Non-option parameter. 
-		break
-	;;
-	esac
-
-	#  Break out of loop if there are no more arguments to process.
-	if shift; then
-		:
-	else
-		break;
-	fi
-done
-
-#  Find srcdir and top_srcdir
-if test "x${mc_srcdir}" = x; then
-	if test "x${mc_top_srcdir}" != x; then
-		mc_srcdir=${mc_top_srcdir}/src
-	else
-		echo "${mc_pn}: error: could not find src directory." 2>&1
-		exit 1
-	fi
-fi
-if test "x${mc_top_srcdir}" = x; then
-	if test "x${mc_srcdir}" != x; then
-		mc_top_srcdir=${mc_srcdir}/..
-	else
-		echo "${mc_pn}: error: could not find top src directory." 2>&1
-		exit 1
-	fi
-fi
-
-
-#
-#  Files
-#
-
-#  List of all selected modules (including the `.mod' at the end)
-mc_fmodules=${mc_bindir}/.modules
-
-#  List of all modules we have detected so far.
-mc_fknownmods=${mc_bindir}/.known_modules
-
-mc_mod_dir=${mc_srcdir}/mod
-
-mc_mod_bin_dir=${mc_bindir}/src/mod
-mc_fMakefile=${mc_mod_bin_dir}/Makefile
-
-mc_fstatic_h=${mc_mod_dir}/static.h
-
-
-#  File descriptor usage:
-#    1  Standard output
-#    2  Errors
-#
-#    6  Misc messages and warnings
-#    7  Goes to /dev/null
-exec 7>/dev/null
-if test "${mc_flag_quiet}" = yes; then
-	exec 6>&7
-else
-	exec 6>&1
-fi
-
-#  Detect flags needed to achieve 'echo -n' (originally from GNU autoconf) ...
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-	#  Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-	if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null
-	then
-		mc_n= mc_c='
-' mc_t='        '
-	else
-		mc_n=-n mc_c= mc_t=
-	fi
-else
-	mc_n= mc_c='\c' mc_t=
-fi
-
-#  This helps us call ourself.
-mc_self_call="$0 --srcdir=${mc_srcdir} --top_srcdir=${mc_topsrcdir}"
-
-#  Assign parameters
-mc_cmd=$1
-if test "x${mc_cmd}" != x; then
-	shift
-	mc_paras=$*
-fi
-
-case x${mc_cmd} in
-xhelp)
-#
-#  Display help
-#
-
-	cat 1>&6 <<EOF
-Usage: ${mc_pn} [OPTIONS] COMMAND
-
-Commands:
-    add                  Add a module to the list of active eggdrop modules.
-    del                  Remove a module from that list.
-    clear                Clear the list.
-    configure            Interactively select modules.
-    is-configured        Exits 0/1 depending on wether modules where
-                           configured or not.
-    help                 Displays this information.
-    detect-modules       Find all available modules.
-    modules-still-exist  Check wether all known modules still exist.
-    eggautoconf          Recreate the configure scripts in every module dir.
-
-Options:
-    --top_srcdir=DIR     Top directory         (At least one of these two
-    --srcdir=DIR         Source directory       directories MUST be supplied.)
-    --bindir=DIR         Binary directory
-    --quiet [-q]         Quiet mode. Only show errors.
-
-Options specific to the \`configure' command:
-
-    --only-new [-n]      Only query new modules.
-EOF
-;;
-xis-configured)
-#
-#  Determine wether the modules were configured yet.
-#
-
-	if test -r "${mc_fmodules}"; then
-		exit 0
-	else
-		exit 1
-	fi
-;;
-xmodules-still-exist)
-#
-#  Check wether all known modules still exist.
-#
-
-	if ${mc_self_call} -q is-configured; then
-		mc_known_mods=`cat ${mc_fknownmods}`
-
-		echo ${mc_n} "checking for removed modules...${mc_c}" 1>&6
-		#  Check wether all known mods still exist
-		for mc_mod in ${mc_known_mods}; do
-			echo ${mc_n} ".${mc_c}" >&6
-			if test ! -d ${mc_mod_dir}/${mc_mod}; then
-				grep -v "^${mc_mod}$" ${mc_fknownmods} > ${mc_fknownmods}_new
-				mv ${mc_fknownmods}_new ${mc_fknownmods}
-			fi
-		done
-		echo " done." 1>&6
-	fi
-;;
-xdetect-modules)
-#
-#  Detect modules. Active modules will be added to the `.modules' file. The
-#  behaviour changes as soon as `.modules' already exists.
-#
-
-	echo ${mc_n} "detecting modules...${mc_c}" >&6
-
-	if ${mc_self_call} -q is-configured; then
-		mc_mods_configured=yes
-
-		mv ${mc_fmodules} ${mc_fmodules}_old
-
-		mc_fmodules_old=${mc_fmodules}
-		mc_fmodules=${mc_fmodules}_old
-	else
-		mc_mods_configured=no
-
-		mc_fmodules_old=
-	fi
-
-	mc_mods=`echo ${mc_srcdir}/mod/*.mod | sed -e 's/\.mod//g'`
-	if test "${mc_mods}" = "${mc_srcdir}/mod/*"; then
-		echo "${mc_pn}: error: no modules detected." >&2
-		exit 1
-	fi
-
-	#  Add them again.
-	mc_mods=`echo ${mc_mods} | sed -e 's/\.mod//g'`
-	for mc_mod in ${mc_mods}; do
-		mc_mod=`echo ${mc_mod} | sed -e 's/.*\///g'`
-		mc_new_mod_state=disabled
-		echo ${mc_n} ".${mc_c}" >&6
-
-		#  Do we have an existing configuration?
-		if (test "${mc_mods_configured}" = yes); then
-			#  Is the module active?
-                        if (grep "^${mc_mod}\.mod\$" ${mc_fmodules} 1>&7 2>&1)
-			then
-				mc_new_mod_state=enabled
-			else
-				#  Was it configured before?
-				if (grep "^${mc_mod}\.mod\$" ${mc_fknownmods} 1>&7 2>&1); then
-					:
-				else
-					mc_new_mod_state=enabled
-				fi
-			fi
-		else
-				mc_new_mod_state=enabled
-		fi
-		if test "${mc_new_mod_state}" = enabled; then
-			${mc_self_call} -q add ${mc_mod}
-		else
-			${mc_self_call} -q del ${mc_mod}
-		fi
-	done
-
-	if test "x${mc_fmodules_old}" != x; then
-		# mc_fmodules actually points to the .modules_old file.
-		rm -f ${mc_fmodules}
-		touch ${mc_fmodules_old}
-	fi
-
-	echo " done." >&6
-;;
-xdel)
-#
-#  Remove a module from the list
-#
-
-	if test "x${mc_paras}" = x; then
-		echo "${mc_pn}: error: no modules specified." 2>&1
-		exit 1
-	fi
-
-	mc_nfmodules="${mc_fmodules}_new"
-
-	#  Remove trailing `.mod'
-	mc_mods=`echo ${mc_paras} | sed -e 's/\.mod//g'`
-	for mc_mod in ${mc_mods}; do
-		#  Remove any path information
-		mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'`
-		echo "${mc_pn}: disabling eggdrop module: ${mc_mod}" 1>&6
-
-		#  Add module to the list of known modules.
-		if grep "^${mc_mod}\.mod$" ${mc_fknownmods} 1>&7 2>&7; then
-			if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then
-				grep -v "^${mc_mod}\.mod$" ${mc_fknownmods} \
-					> ${mc_fknownmods}_new
-				mv ${mc_fknownmods}_new ${mc_fknownmods}
-			fi
-		else
-			if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then
-				:
-			else
-				echo ${mc_mod}.mod 1>> ${mc_fknownmods}
-			fi
-		fi
-
-		# In case there are any active modules ...
-		if test -r ${mc_fmodules}; then
-			#  Remove module from list of active modules.
-			if grep -v "^${mc_mod}\.mod$" ${mc_fmodules} \
-				1> ${mc_nfmodules}
-			then
-				:
-			else
-				echo "${mc_pn}: error: building new module file failed" 1>&2
-				echo "grepping for ${mc_mod}.mod in ${mc_fmodules} and writing to ${mc_nfmodules}"
-				kill -STOP $$
-				exit 1
-			fi
-			mv ${mc_nfmodules} ${mc_fmodules}
-		fi
-	done
-;;
-xadd)
-#
-#  Add a module to the list
-#
-
-	if test "x${mc_paras}" = x; then
-		echo "${mc_pn}: error: no modules specified." 2>&1
-		exit 1
-	fi
-
-	#  Remove trailing `.mod'
-	mc_mods=`echo ${mc_paras} | sed -e 's/\.mod//g'`
-	for mc_mod in ${mc_mods}; do
-		#  Remove any path information
-		mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'`
-
-		#  Add module to the list of known modules.
-		if grep "^${mc_mod}\.mod$" ${mc_fknownmods} 1>&7 2>&7; then
-			if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then
-				grep -v "^${mc_mod}\.mod$" ${mc_fknownmods} \
-					> ${mc_fknownmods}_new
-				mv ${mc_fknownmods}_new ${mc_fknownmods}
-			fi
-		else
-			if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then
-				:
-			else
-				echo ${mc_mod}.mod 1>> ${mc_fknownmods}
-			fi
-		fi
-
-		#  Add module to the list of active modules.
-		if grep "^${mc_mod}\.mod$" ${mc_fmodules} 1>&7 2>&7; then
-			:
-		else
-			if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then
-				echo "${mc_pn}: warning: module does not exist: \`${mc_mod}', ignoring." 1>&2
-			else
-				echo "${mc_pn}: enabling eggdrop module: ${mc_mod}" 1>&6
-
-				#  Add it to the file
-				echo ${mc_mod}.mod 1>> ${mc_fmodules}
-			fi
-		fi
-	done
-;;
-xclear)
-#
-#  Clear list of modules 
-#
-
-	echo "${mc_pn}: cleared list of eggdrop modules." 1>&6
-	rm -f ${mc_fmodules}
-	touch ${mc_fmodules}
-;;
-xconfigure)
-#
-#  Interactive module selection
-#
-
-	cat 1>&6 <<EOF
-
-            -*-    Eggdrop Interactive Module Selection    -*-
-
-EOF
-
-	#  Check for selected modules
-	if test ! -r ${mc_fmodules}; then
-		echo "${mc_pn}: error: no modules selected. You did not run configure yet." 1>&2
-		exit 1
-	fi
-
-	#  Read current list
-	mc_sel_modules=`cat ${mc_fmodules}`
-
-	#  Detect available modules
-	mc_mods=`echo ${mc_mod_dir}/*.mod`
-
-	#  Error out if we have no available modules
-	if test "${mc_mods}" = "echo ${mc_mod_dir}/*.mod"; then
-		echo "${mc_pn}: error: no modules found." 1>&2
-		exit 1
-	fi
-
-	#  Loop through each available module
-	for mc_mod in ${mc_mods}; do
-		#  Remove directory information from name
-		mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'`
-
-		#  Only ask for new modules?
-		if test "${mc_flag_onlynew}" = yes; then
-			#  Did we already query for that module?
-			if grep "^${mc_mod}$" ${mc_fknownmods} 1>&7 2>&7; then
-				continue
-			fi
-		fi
-
-		#  Remove .mod ending
-		mc_modname=`echo ${mc_mod} | sed -e 's/\.mod//g'`
-
-		#  Note: We need to make sure that we only catch module names
-		#        that match _exactly_. e.g. don't mix bseen and seen.
-		if (echo ${mc_sel_modules} | grep " ${mc_mod}" 1>&7 2>&7) ||
-		    (echo ${mc_sel_modules} | grep "^${mc_mod}" 1>&7 2>&7)
-
-		then
-			#  The module is selected.
-			mc_mstate="enabled"
-			mc_mdisp="(E)nable / (d)isable  [E/d]"
-		else
-			#  The module is NOT selected.
-			mc_mstate="disabled"
-			mc_mdisp="(e)nable / (D)isable  [e/D]"
-		fi
-
-		#  Display description
-		if test -r ${mc_mod_dir}/${mc_mod}/modinfo; then
-			echo "" 1>&6
-			grep "^DESC:" ${mc_mod_dir}/${mc_mod}/modinfo | \
-				sed -e 's/^DESC:/   /' 1>&6
-			echo "" 1>&6
-		fi
-
-		while true; do
-			echo ${mc_n} "\`${mc_modname}' is ${mc_mstate}, ${mc_mdisp} ${mc_c}" 1>&6
-			read mc_ask_response;
-
-			if (test "${mc_ask_response}" = D); then
-				mc_ask_response=d;
-			fi
-			if (test "${mc_ask_response}" = E); then
-				mc_ask_response=e;
-			fi
-
-			#  If the user just presses [return] or
-			#  if the selected state matches the old state,
-			#  then we change nothing.
-			if test "x${mc_ask_response}" = x || \
-			    (test "${mc_ask_response}" = d && \
-			     test "${mc_mstate}" = disabled) || \
-			    (test "${mc_ask_response}" = e && \
-			     test "${mc_mstate}" = enabled); then
-				echo "Changing nothing." 1>&6
-				break;
-			fi
-			if (test "${mc_ask_response}" = e); then
-				#  Add it to the list.
-				mc_sel_modules="${mc_sel_modules} ${mc_mod}"
-				echo "Enabled module ${mc_modname}." 1>&6
-				break;
-			fi
-			if (test "${mc_ask_response}" = d); then
-				#  Remove module from list.
-				mc_sel_modules=`echo ${mc_sel_modules} | sed -e "s/ ${mc_mod}//g" -e "s/^${mc_mod}//g"`
-				echo "Disabled module ${mc_modname}." 1>&6
-				break;
-			fi
-		done
-		echo "" 1>&6
-	done
-
-	echo ${mc_n} "recreating list of active modules... ${mc_c}" 1>&6
-	${mc_self_call} -q clear
-	if (${mc_self_call} -q add ${mc_sel_modules}); then
-		echo "done." 1>&6
-	else
-		echo "failed!" 1>&6
-		exit 1
-	fi
-;;
-xeggautoconf)
-#
-#  Recreate the eggdrop specific configure scripts for every module.
-#
-
-	#  Detect available modules
-	mc_mods=`echo ${mc_mod_dir}/*.mod`
-
-	#  Error out if we have no available modules
-	if test "${mc_mods}" = "echo ${mc_mod_dir}/*.mod"; then
-		echo "${mc_pn}: error: no modules found." 1>&2
-		exit 1
-	fi
-
-	#  Loop through each available module
-	for mc_modd in ${mc_mods}; do
-		#  Skip modules without their own configure script.
-		if test ! -r "${mc_modd}/configure.in"; then
-			continue
-		fi
-
-		#  Remove directory information from name
-		mc_mod=`echo ${mc_modd} | sed -e 's/.*\///'`
-		echo "creating configure for module \`${mc_mod}'."
-		(cd ${mc_modd} && ../eggautoconf)
-	done
-;;
-*)
-	if test "x${mc_cmd}" = x; then
-		echo "${mc_pn}: error: no command supplied." 1>&2
-	else
-		echo "${mc_pn}: error: ${mc_cmd}: unknown command." 1>&2
-	fi
-	${mc_self_call} help
-;;
-esac
-
-exit 0

+ 3 - 3
src/mod/dns.mod/configure.in

@@ -89,11 +89,11 @@ if test "${dns_reslib_avail}" = false; then
   cat >&2 <<EOF
 configure: warning:
 
-  Your system provides no functional resolver library. The DNS
-  module will therefore be disabled.
+  Your system provides no functional resolver library. 
+  One is required for buld.
 
 EOF
-  EGG_REMOVE_MOD(dns)
+  exit 1
 fi
 AC_SUBST(RESLIB)
 AC_SUBST(RESINCLUDE)

+ 0 - 6
src/mod/eggmod.m4

@@ -3,12 +3,6 @@ dnl   macros eggdrop modules should use instead of the original autoconf
 dnl   versions.
 dnl
 
-dnl
-dnl EGG_REMOVE_MOD(MODULE-NAME)
-dnl
-define(EGG_REMOVE_MOD,
-[${srcdir}/../../../misc/modconfig -q --top_srcdir=${srcdir}/../../.. --bindir=../../.. del $1])
-
 dnl
 dnl EGG_INIT(UNIQUE-SOURCE-FILE)
 dnl