1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 02:03:14 +02:00

BUILD : 1.7.4 (264) BUGS : N/A NOTES : Switched to autoconf - try to commit part 1

git-svn-id: svn://svn.anope.org/anope/trunk@264 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@169 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-07-19 14:08:30 +00:00
parent 7fffea77ed
commit a1479a8775
80 changed files with 13638 additions and 1997 deletions
+1
View File
@@ -1,6 +1,7 @@
Anope Version S V N
-------------------
Provided by Anope Dev. <dev@anope.org> - 2004
07/17 A Switched to autoconf for configure script. [ #00]
07/05 A Warning when LocalAddress conflicts with RemoteServer. [#118]
06/18 A Added proper Bahamut1.8 support. [ #55]
07/15 F Fixed the bug where /ns release didn't work with UseSVSHOLD. [#125]
Executable
+374
View File
@@ -0,0 +1,374 @@
#!/bin/sh
#
# Configuration script for Services.
#
# Anope (c) 2003 Anope team
# Contact us at dev@anope.org
#
# This program is free but copyrighted software; see the file COPYING for
# details.
#
# Based on the original code of Epona by PegSoft.
# Based on the original code of Services by Andy Church.
#
###########################################################################
echo2 () {
$ECHO2 "$*$ECHO2SUF" # these are defined later
}
ECHO2SUF=''
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
ECHO2='echo -n'
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
ECHO2='echo' ; ECHO2SUF='\c'
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
ECHO2='printf "%s"'
else
# oh well...
ECHO2='echo'
fi
export ECHO2 ECHO2SUF
exists () { # because some shells don't have test -e
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
return 0
else
return 1
fi
}
###########################################################################
# Init values
###########################################################################
BINDEST=$HOME/services
DATDEST=$HOME/services
RUNGROUP=
UMASK=
IRCTYPE="no default"
ENCRYPTION=
###########################################################################
# Load the cache
###########################################################################
if [ -f config.cache -a -r config.cache -a ! "$IGNORE_CACHE" ] ; then
cat <<EOT
Using defaults from config.cache. To ignore, rm config.cache
EOT
. config.cache
fi
###########################################################################
echo ""
echo "-========================= A N O P E ==========================-"
echo "For more detailed information on the features of Anope1.7 please"
echo "read the self-named documentation found on the 'docs' directory."
echo ""
echo "Anope is a set of IRC Service expanded upon Lara's Epona, based"
echo "on Andy Church's IRC Services. For all your Anope needs please"
echo "visit our portal at http://www.anope.org/"
echo ""
echo "Please read the INSTALL file for install/upgrade instructions."
echo "Reading the FAQ and README files would be a good idea too. (all"
echo "documentation is located on directory 'docs')."
echo "-==============================================================-"
echo ""
echo "Beginning Services configuration."
echo ""
###########################################################################
# Ask the user anything we need to know ahead of time.
export ok INPUT
####
ok=0
echo "Note: press Return for the default, or enter a new value."
echo "In what directory do you want the binaries to be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$BINDEST] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$BINDEST
fi
if [ ! -d "$INPUT" ] ; then
if exists "$INPUT" ; then
echo "$INPUT exists, but is not a directory!"
else
echo "$INPUT does not exist. Create it?"
echo2 "[y] "
read YN
if [ "$YN" != "n" ] ; then
if mkdir -p $INPUT ; then
ok=1
fi
fi
fi
elif exists "$INPUT/include/services.h" ; then
echo "You cannot use the Services source directory as a target directory."
else
ok=1
fi
done
BINDEST=$INPUT
DATDEST=$INPUT
echo ""
####
ok=0
echo "Where do you want the data files to be installed?"
while [ $ok -eq 0 ] ; do
echo2 "[$DATDEST] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$DATDEST
fi
if [ ! -d "$INPUT" ] ; then
if exists "$INPUT" ; then
echo "$INPUT exists, but is not a directory!"
else
echo "$INPUT does not exist. Create it?"
echo2 "[y] "
read YN
if [ "$YN" != "n" ] ; then
if mkdir -p $INPUT ; then
ok=1
fi
fi
fi
elif exists "$INPUT/include/services.h" ; then
echo "You cannot use the Services source directory as a target directory."
else
ok=1
fi
done
DATDEST=$INPUT
echo ""
####
OLD_RUNGROUP="$RUNGROUP"
if [ "$RUNGROUP" ] ; then
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, type "\"none\"
echo "(without the quotes) and press Return.)"
else
echo "Which group should all Services data files be owned by? (If Services"
echo "should not force files to be owned by a particular group, just press"
echo "Return.)"
fi
echo2 "[$RUNGROUP] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ "$INPUT" ] ; then
if [ "$INPUT" = "none" ] ; then
RUNGROUP=""
else
RUNGROUP="$INPUT"
fi
fi
echo ""
####
if [ ! "$UMASK" -o "$RUNGROUP" != "$OLD_RUNGROUP" ] ; then
if [ "$RUNGROUP" ] ; then
UMASK=007
else
UMASK=077
fi
fi
ok=0
echo "What should the default umask for data files be (in octal)?"
echo "(077 = only accessible by owner; 007 = accessible by owner and group)"
while [ $ok -eq 0 ] ; do
echo2 "[$UMASK] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$UMASK
fi
if [ `echo "$INPUT" | grep -c '[^0-7]'` -gt 0 ] ; then
echo "$UMASK is not a valid octal number!"
else
if [ "`echo $INPUT | cut -c1`" != "0" ] ; then
INPUT=0$INPUT
fi
ok=1
fi
done
UMASK=$INPUT
echo ""
####
ok=0
echo "Select the closest to the type of server on your IRC network:"
echo " 1) DreamForge 4.6.7 [dated IRCd, upgrade to a current one]"
echo " 2) Bahamut 1.4.27 [or later]"
echo " 3) UnrealIRCd 3.1.1 [or later]"
echo " 4) UltimateIRCd 2.8.2 [or later]"
echo " 5) UltimateIRCd 3.0.0 [alpha26 or later]"
echo " 6) Hybrid IRCd 7.0 [experimental]"
echo " 7) ViagraIRCd 1.3.x [or later]"
echo " 8) PTlink 6.15.0 [experimental]"
echo " 9) RageIRCd 2.0 [beta-3 or later]"
while [ $ok -eq 0 ] ; do
echo2 "[$IRCTYPE] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$IRCTYPE
fi
case $INPUT in
no\ default)
echo "You must specify your IRC server type in order for Services to function"
echo "correctly."
;;
1)
IRCTYPE_DEF="IRC_DREAMFORGE"
ok=1;
;;
2)
IRCTYPE_DEF="IRC_BAHAMUT"
ok=1;
;;
3)
IRCTYPE_DEF="IRC_UNREAL"
ok=1;
;;
4)
IRCTYPE_DEF="IRC_ULTIMATE"
ok=1;
;;
5)
IRCTYPE_DEF="IRC_ULTIMATE3"
ok=1;
;;
6)
IRCTYPE_DEF="IRC_HYBRID"
ok=1;
;;
7)
IRCTYPE_DEF="IRC_VIAGRA"
ok=1;
;;
8)
IRCTYPE_DEF="IRC_PTLINK"
ok=1;
;;
9)
IRCTYPE_DEF="IRC_RAGE2"
ok=1;
;;
*)
echo "Please enter a valid option number."
;;
esac
done
IRCTYPE=$INPUT
echo ""
####
if [ "$ENCRYPTION" = "ENCRYPT_MD5" ] ; then
DEF=yes
else
DEF=no
fi
ok=0
echo "Do you want to use the MD5 message-digest algorithm to encrypt passwords?"
echo "(Selecting "\"yes\"" protects your passwords from being stolen if someone"
echo "gains access to the Services databases, but makes it impossible to recover"
echo "forgotten passwords. There is no way to reverse this operation, so make"
echo "sure you really want to enable it.)"
while [ $ok -eq 0 ] ; do
echo2 "[$DEF] "
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
if [ ! "$INPUT" ] ; then
INPUT=$DEF
fi
case $INPUT in
n*|N*)
ENCRYPTION=
ok=1
;;
y*|Y*)
ENCRYPTION=ENCRYPT_MD5
ok=1
;;
*)
echo "Please enter 'yes' or 'no'."
;;
esac
done
echo ""
####
################################################################################
# Store values
################################################################################
echo2 "Saving configuration results in config.cache... "
cat <<EOT >config.cache
BINDEST="$BINDEST"
DATDEST="$DATDEST"
RUNGROUP="$RUNGROUP"
UMASK=$UMASK
IRCTYPE=$IRCTYPE
IRCTYPE_DEF="$IRCTYPE_DEF"
ENCRYPTION="$ENCRYPTION"
EOT
echo "done."
################################################################################
# Build the configure string
################################################################################
WITH_BIN=""
WITH_DATA=""
WITH_ENC=""
WITH_IRCD=""
WITH_RUN=""
WITH_PERM=""
if [ "$BINDEST" != "" ] ; then
WITH_BIN=" --with-bindir=$BINDEST"
WITH_DATA=" --with-datadir=$DATDEST"
fi
if [ "$DATDEST" != "" ] ; then
WITH_DATA=" --with-datadir=$DATDEST"
fi
if [ "$ENCRYPTION" != "" ] ; then
WITH_ENC=" --with-encryption"
fi
if [ "$IRCTYPE_DEF" != "" ] ; then
WITH_IRCD=" --with-ircd=$IRCTYPE_DEF"
fi
if [ "$RUNGROUP" != "" ] ; then
WITH_RUN=" --with-rungroup=$RUNGROUP"
fi
if [ "$UMASK" != "" ] ; then
WITH_PERM=" --with-permissions=$UMASK"
fi
./configure $WITH_BIN $WITH_DATA $WITH_ENC $WITH_IRCD $WITH_RUN $WITH_PERM
-178
View File
@@ -1,178 +0,0 @@
# Makefile for Epona.
#
# Epona (c) 2000-2002 PegSoft
# Contact us at epona@pegsoft.net
#
# This program is free but copyrighted software; see the file COPYING for
# details.
#
# Based on the original code of Services by Andy Church.
include Makefile.inc
###########################################################################
########################## Configuration section ##########################
# Note that changing any of these options (or, in fact, anything in this
# file) will automatically cause a full rebuild of Services.
# Compilation options:
# -DCLEAN_COMPILE Attempt to compile without any warnings (note that
# this may reduce performance)
# -DSTREAMLINED Leave out "fancy" options to enhance performance
CDEFS =
# Add any extra flags you want here. The default line enables warnings and
# debugging symbols on GCC. If you have a non-GCC compiler, you may want
# to comment it out or change it.
MORE_CFLAGS = -Wall -g
######################## End configuration section ########################
###########################################################################
CFLAGS = $(CDEFS) $(BASE_CFLAGS) $(MORE_CFLAGS)
OBJS = actions.o botserv.o channels.o chanserv.o commands.o compat.o converter.o \
config.o datafiles.o encrypt.o helpserv.o hostserv.o init.o language.o list.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
process.o protocol.o proxy.o send.o servers.o sessions.o slist.o sockutil.o \
timeout.o users.o \
$(VSNPRINTF_O) $(RDB_O) $(MYSQL_O)
SRCS = actions.c botserv.c channels.c chanserv.c commands.c compat.c converter.c \
config.c datafiles.c encrypt.c helpserv.c hostserv.c init.c language.c list.c log.c mail.c main.c \
memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \
process.c protocol.c proxy.c send.c servers.c sessions.c slist.c sockutil.c \
timeout.c users.c \
$(VSNPRINTF_C) $(RDB_C) $(MYSQL_C)
.c.o:
$(CC) $(CFLAGS) -c $<
all: $(PROGRAM) languages modules
@echo Now run \"$(MAKE) install\" to install Services.
myclean:
rm -f *.o $(PROGRAM) a.out
clean: myclean
(cd lang ; $(MAKE) spotless)
rm -f language.h
(cd modules ; $(MAKE) clean)
spotless: myclean
(cd lang ; $(MAKE) spotless)
(cd modules ; rm -f *.so Makefile.inc)
rm -f config.cache configure.log sysconf.h Makefile.inc language.h version.h *~
distclean: spotless
install: $(PROGRAM) languages
$(INSTALL) services $(BINDEST)/services
$(INSTALL) bin/anoperc $(BINDEST)/anoperc
rm -f $(BINDEST)/listnicks $(BINDEST)/listchans
ln $(BINDEST)/services $(BINDEST)/listnicks
ln $(BINDEST)/services $(BINDEST)/listchans
(cd lang ; $(MAKE) install)
$(CP_ALL) data/* $(DATDEST)
test -d $(DATDEST)/backups || mkdir $(DATDEST)/backups
test -d $(DATDEST)/logs || mkdir $(DATDEST)/logs
@if [ "$(MODULE_PATH)" ] ; then \
(cd modules ; $(MAKE) install) ; \
fi
@if [ "$(RUNGROUP)" ] ; then \
echo chgrp -R $(RUNGROUP) $(DATDEST) ; \
chgrp -R $(RUNGROUP) $(DATDEST) ; \
echo chmod -R g+rw $(DATDEST) ; \
chmod -R g+rw $(DATDEST) ; \
echo find $(DATDEST) -type d -exec chmod g+xs \'\{\}\' \\\; ; \
find $(DATDEST) -type d -exec chmod g+xs '{}' \; ; \
fi
@echo ""
@echo "Don't forget to create/update your services.conf file! See"
@echo "the README for details."
@echo ""
###########################################################################
$(PROGRAM): version.h $(OBJS)
$(CC) $(LFLAGS) $(OBJS) $(LIBS) $(MLIBS) -o $@ $(ELIBS)
languages: FRC
(cd lang ; $(MAKE) CFLAGS="$(CFLAGS)")
modules: FRC
@if [ "$(MODULE_PATH)" ] ; then \
(cd modules ; ./configure ; $(MAKE) CFLAGS="$(CFLAGS)") \
fi
# Catch any changes in compilation options at the top of this file
$(OBJS): Makefile
actions.o: actions.c services.h
botserv.o: botserv.c services.h pseudo.h
channels.o: channels.c services.h
chanserv.o: chanserv.c services.h pseudo.h
commands.o: commands.c services.h commands.h language.h
compat.o: compat.c services.h
config.o: config.c services.h
converter.o: converter.c services.h datafiles.h
datafiles.o: datafiles.c services.h datafiles.h
encrypt.o: encrypt.c encrypt.h sysconf.h
init.o: init.c services.h
hostserv.o: hostserv.c services.h pseudo.h
language.o: language.c services.h language.h
list.o: list.c services.h
log.o: log.c services.h pseudo.h
mail.o: mail.c services.h language.h
main.o: main.c services.h timeout.h version.h
memory.o: memory.c services.h
memoserv.o: memoserv.c services.h pseudo.h
messages.o: messages.c services.h messages.h language.h
misc.o: misc.c services.h language.h
news.o: news.c services.h pseudo.h
nickserv.o: nickserv.c services.h pseudo.h
operserv.o: operserv.c services.h pseudo.h
process.o: process.c services.h messages.h
protocol.o: protocol.c services.h
proxy.o: proxy.c services.h pseudo.h
send.o: send.c services.h
servers.o: servers.c services.h
sessions.o: sessions.c services.h pseudo.h
slist.o: slist.c services.h slist.h
sockutil.o: sockutil.c services.h
timeout.o: timeout.c services.h timeout.h
users.o: users.c services.h
vsnprintf.o: vsnprintf.c
services.h: sysconf.h config.h extern.h
touch $@
extern.h: slist.h
touch $@
pseudo.h: commands.h language.h timeout.h encrypt.h datafiles.h slist.h
touch $@
version.h: Makefile version.sh version.log services.h pseudo.h messages.h $(SRCS)
sh version.sh
language.h: lang/language.h
cp -p lang/language.h .
lang/language.h: lang/Makefile lang/index
(cd lang ; $(MAKE) language.h)
lang/index:
(cd lang ; $(MAKE) index)
###########################################################################
FRC:
+53
View File
@@ -0,0 +1,53 @@
CC=@CC@
INCLUDEDIR=../include
ANOPELIBS=@ANOPELIBS@
CFLAGS=@CFLAGS@
SHELL=/bin/sh
SUBDIRS=src
BINDEST=@BINDEST@
DATDEST=@DATDEST@
INSTALL=@INSTALL@
RM=@RM@
CP=@CP@
TOUCH=@TOUCH@
MODULE_PATH=@MODULE_PATH@
MYSQL=@MYSQL@
RDB=@RDB@
all: language headers build modules
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' 'RDB=${RDB}'\
'MYSQL=${MYSQL}'
build:
@for i in $(SUBDIRS); do \
echo "Building $$i";\
( cd $$i; ${MAKE} ${MAKEARGS} all; ) \
done
modules: build
(cd src/modules ; ./configure ; ${MAKE} ${MAKEARGS} all )
language:
(cd lang ; $(MAKE) ${MAKEARGS} all language.h ; cp language.h ../include/)
headers:
(cd include ; ${MAKE} ${MAKEARGS} )
clean:
(cd lang ; ${MAKE} ${MAKEARGS} clean )
(cd include ; ${MAKE} ${MAKEARGS} clean )
(cd src ; ${MAKE} ${MAKEARGS} clean )
distclean: clean
(cd include ; ${MAKE} ${MAKEARGS} distclean)
rm -f config.log config.status config.cache Makefile
install: DUMMY
(cd src ; ${MAKE} ${MAKEARGS} install)
DUMMY:
Vendored
+229
View File
@@ -0,0 +1,229 @@
dnl Macro: unet_CHECK_TYPE_SIZES
dnl
dnl Check the size of several types and define a valid int16_t and int32_t.
dnl
AC_DEFUN(unreal_CHECK_TYPE_SIZES,
[dnl Check type sizes
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(u_int16_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 2 ; then
AC_CHECK_TYPE(int16_t, short)
AC_CHECK_TYPE(u_int16_t, unsigned short)
else
AC_MSG_ERROR([Cannot find a type with size of 16 bits])
fi
if test "$ac_cv_sizeof_int" = 4 ; then
AC_CHECK_TYPE(int32_t, int)
AC_CHECK_TYPE(u_int32_t, unsigned int)
elif test "$ac_cv_sizeof_short" = 4 ; then
AC_CHECK_TYPE(int32_t, short)
AC_CHECK_TYPE(u_int32_t, unsigned short)
elif test "$ac_cv_sizeof_long" = 4 ; then
AC_CHECK_TYPE(int32_t, long)
AC_CHECK_TYPE(u_int32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
fi
])
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_LANG_SAVE
AC_LANG_C
acx_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on True64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
pthread-config)
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
if test x"$acx_pthread_config" = xno; then continue; fi
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
AC_LANG_RESTORE
])dnl ACX_PTHREAD
+1360
View File
File diff suppressed because it is too large Load Diff
Vendored
+1375
View File
File diff suppressed because it is too large Load Diff
Vendored
+9656 -1771
View File
File diff suppressed because it is too large Load Diff
+210
View File
@@ -0,0 +1,210 @@
dnl autoconf.in for Services.
dnl
dnl Anope (c) 2003 Anope team
dnl Contact us at anope@zero.org
dnl This program is free but copyrighted software; see the file COPYING for
dnl details.
dnl Based heavily on the Unreal configure.in script, and extra thanks to
dnl codemastr from UnrealIRCD.
AC_INIT(src/actions.c)
if test $# = 0; then
echo "You might want to run ./Config or provide some parameters to this script."
echo "./configure --help for information about this script"
exit 0
fi
AC_CONFIG_HEADER(include/sysconf.h)
AC_PROG_CC
if test "$ac_cv_prog_gcc" = "yes"; then
CFLAGS="$CFLAGS -funsigned-char"
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -pipe"
AC_TRY_COMPILE(,, ac_cv_pipe="yes", ac_cv_pipe="no")
CFLAGS="$save_cflags"
])
if test "$ac_cv_pipe" = "yes"; then
CFLAGS="-pipe $CFLAGS"
fi
fi
dnl CFLAGS="$CFLAGS -W -Wall"
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(TOUCH,touch)
AC_PATH_PROG(INSTALL,install)
AC_CHECK_LIB(nsl,inet_ntoa,ANOPELIBS="$ANOPELIBS-lnsl ")
AC_CHECK_LIB(socket, socket,ANOPELIBS="$ANOPELIBS-lsocket ")
AC_CHECK_LIB(resolv, res_query,ANOPELIBS="$ANOPELIBS-lresolv ")
AC_CHECK_LIB(bsd, revoke,ANOPELIBS="$ANOPELIBS-lbsd ")
AC_CHECK_LIB(mysqlclient, mysql_real_connect,[
ANOPELIBS="$ANOPELIBS-lmysqlclient "
AC_DEFINE_UNQUOTED(USE_MYSQL,1,"Use Mysql")
AC_DEFINE_UNQUOTED(USE_RDB,1,"Use RDB")
MYSQL=" mysql.c "
RDB=" rdb.c "
AC_SUBST(MYSQL)
AC_SUBST(RDB)
AC_CHECK_HEADER(mysql.h,[
AC_DEFINE(HAVE_MYSQL_MYSQL_H,"1","We have the mysql Header file")
])
AC_CHECK_HEADER(mysql/mysql.h,[
AC_DEFINE(HAVE_MYSQL_MYSQL_H,"1","We have the mysql Header file")
AC_DEFINE(MYSQL_HEADER_PREFIX,"1","mysql.h is in a mysql/ folder")
])
])
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
ACX_PTHREAD([
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
ANOPELIBS="$ANOPELIBS$PTHREAD_LIBS "
AC_DEFINE_UNQUOTED(USE_THREADS,1,"Use threads")
])
AC_SUBST(ANOPELIBS)
dnl module checking based on Unreal's module checking code
AC_DEFUN(AC_ENABLE_DYN,
[
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl,dlopen,[
ANOPELIBS="$ANOPELIBS -ldl"
AC_DEFINE(USE_MODULES,1,"Modules are available")
USE_MODULES="yes"
],
[
AC_MSG_WARN(Dynamic linking is not enabled because dlopen was not found)
AC_DEFINE(STATIC_LINKING,"NO_MODULES","modules not available")
]))
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -export-dynamic"
AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [
AC_TRY_LINK(, [int i];, ac_cv_export_dynamic=yes, ac_cv_export_dynamic=no)])
if test "$ac_cv_export_dynamic" = "no"; then
CFLAGS=$hold_cflags
fi
AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[
if test "$ac_cv_prog_gcc" = "yes"; then
ac_cv_pic="-fPIC -DPIC -shared"
else
case `uname -s` in
SunOS*[)]
ac_cv_pic="-KPIC -DPIC -G"
;;
esac
fi
])
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
cat >uscore.c << __EOF__
int main() {
return 0;
}
__EOF__
$CC -o uscore $CFLAGS uscore.c 1>&5
if test -z "`strings -a uscore |grep '^_main$'`"; then
ac_cv_underscore=no
else
ac_cv_underscore=yes
fi
rm -f uscore uscore.c
])
if test "$ac_cv_underscore" = "yes"; then
AC_DEFINE(DL_PREFIX,"_","Underscore needed for dlopen")
else
AC_DEFINE(DL_PREFIX,"","No prefix needed for dlopen")
fi
MODULEFLAGS=$ac_cv_pic
AC_DEFINE(USE_MODULES,1,"Modules available")
])
AC_ENABLE_DYN
unreal_CHECK_TYPE_SIZES
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H,1,""))
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H,1,""))
AC_CHECK_HEADER(sys/sysproto.h,AC_DEFINE(HAVE_SYS_SYSPROTO_H,1,""))
AC_CHECK_FUNCS(strerror,AC_DEFINE(HAVE_STRERROR,1))
AC_CHECK_FUNCS(sys_errlist,AC_DEFINE(HAVE_SYS_ERRLIST,1))
AC_CHECK_FUNCS(snprintf,AC_DEFINE(HAVE_SNPRINTF,1))
AC_CHECK_FUNCS(stricmp,AC_DEFINE(HAVE_STRICMP,1))
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(HAVE_STRCASECMP,1))
AC_CHECK_FUNCS(strdup,AC_DEFINE(HAVE_STRDUP,1))
AC_CHECK_FUNCS(strspn,AC_DEFINE(HAVE_STRSPN,1))
AC_CHECK_FUNCS(strsignal,AC_DEFINE(HAVE_STRSIGNAL,1))
AC_CHECK_FUNCS(gettimeofday,AC_DEFINE(HAVE_GETTIMEOFDAY,1))
AC_CHECK_FUNCS(setgrent,AC_DEFINE(HAVE_SETGRENT,1))
AC_CHECK_FUNCS(umask,AC_DEFINE(HAVE_UMASK,1))
AC_CHECK_FUNCS(fork,AC_DEFINE(HAVE_FORK,1))
AC_CHECK_FUNCS(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME,1))
AC_CHECK_FUNCS(gethostbyname_r,AC_DEFINE(HAVE_GETHOSTBYNAME_R,1))
AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group"))
dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname")
AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions"))
AC_ARG_WITH(bindir, [ --with-bindir=bindir Specify the default binary dir for anope], [
AC_DEFINE_UNQUOTED(SERVICES_BIN,"${withval}/services","Binary Dir")
BINDEST=$withval
DATDEST=$withval
MODULE_PATH=${withval}/modules/
])
AC_SUBST(BINDEST)
AC_ARG_WITH(datadir, [ --with-datadir=datadir Specify the location of the services data folder], [
AC_DEFINE_UNQUOTED(SERVICES_DIR,"$withval","services bin dir")
AC_DEFINE_UNQUOTED(MODULE_PATH,"${withval}/modules/","Module dir")
DATDEST=$withval
MODULE_PATH=${withval}/modules/
])
AC_SUBST(DATDEST)
AC_SUBST(MODULE_PATH)
AC_ARG_WITH(ircd, [ --with-ircd=ircd Specify the first ircd type], [
if test "$withval" = "IRC_DREAMFORGE"; then
AC_DEFINE(IRC_DREAMFORGE,1,"Frist IRCD type")
elif test "$withval" = "IRC_BAHAMUT"; then
AC_DEFINE(IRC_BAHAMUT,1,"First IRCD type")
elif test "$withval" = "IRC_UNREAL"; then
AC_DEFINE(IRC_DREAMFORGE,1,"First IRCD type")
AC_DEFINE(IRC_UNREAL,1,"Second IRCD type")
elif test "$withval" = "IRC_ULTIMATE"; then
AC_DEFINE(IRC_DREAMFORGE,1,"First IRCD type")
AC_DEFINE(IRC_ULTIMATE,1,"Second IRCD type")
elif test "$withval" = "IRC_ULTIMATE3"; then
AC_DEFINE(IRC_DREAMFORGE,1,"First IRCD type")
AC_DEFINE(IRC_ULTIMATE3,1,"Second IRCD type")
elif test "$withval" = "IRC_HYBRID"; then
AC_DEFINE(IRC_HYBRID,1,"First IRCD type")
elif test "$withval" = "IRC_VIAGRA"; then
AC_DEFINE(IRC_BAHAMUT,1,"First IRCD type")
AC_DEFINE(IRC_VIAGRA,1,"Second IRCD type")
elif test "$withval" = "IRC_PTLINK"; then
AC_DEFINE(IRC_PTLINK,1,"First IRCD type")
elif test "$withval" = "IRC_RAGE2"; then
AC_DEFINE(IRC_BAHAMUT,1,"First IRCD type")
AC_DEFINE(IRC_RAGE2,1,"Second IRCD type")
fi
])
AC_ARG_WITH(encryption, [ --with-encryption Use md5 database encryption], AC_DEFINE_UNQUOTED(USE_ENCRYPTION,"USE_ENCRYPTION","has encryption"))
AC_OUTPUT(Makefile)
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: commands.h,v 1.6 2003/08/16 22:13:47 rob Exp $
* $Id$
*
*/
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: config.h,v 1.7 2003/09/04 18:55:34 rob Exp $
* $Id$
*
*/
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: datafiles.h,v 1.4 2003/07/20 01:15:49 dane Exp $
* $Id$
*
*/
+1 -1
View File
@@ -9,7 +9,7 @@
* Based on the original code of Services by Andy Church.
*
*
* $Id: defs.h,v 1.4 2003/07/20 01:15:49 dane Exp $
* $Id$
*
*/
View File
View File
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: messages.h,v 1.5 2003/07/20 01:15:49 dane Exp $
* $Id$
*
*/
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: modules.h,v 1.16 2004/03/11 16:50:01 rob Exp $
* $Id$
*/
#ifndef MODULES_H
View File
+9 -4
View File
@@ -57,15 +57,20 @@
#ifdef USE_MYSQL
# define MYSQL_WARNING 2
# define MYSQL_ERROR 4
#ifdef HAVE_MYSQL_MYSQL_H
# include <mysql.h>
# include <errmsg.h>
#ifdef MYSQL_HEADER_PREFIX
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#else
# include <mysql/mysql.h>
# include <mysql/errmsg.h>
#include <mysql.h>
#include <errmsg.h>
#endif
#endif
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: slist.h,v 1.4 2003/07/20 01:15:50 dane Exp $
* $Id$
*
*/
+209
View File
@@ -0,0 +1,209 @@
/* include/sysconf.h.in. Generated from ./autoconf/configure.in by autoheader. */
/* "Default umask Permissions" */
#undef DEFUMASK
/* "Underscore needed for dlopen" */
#undef DL_PREFIX
/* "Has sys/types.h" */
#undef HAS_SYS_TYPES_H
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `gethostbyname_r' function. */
#undef HAVE_GETHOSTBYNAME_R
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* "We have the mysql Header file" */
#undef HAVE_MYSQL_MYSQL_H
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the `setgrent' function. */
#undef HAVE_SETGRENT
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the `strerror' function. */
#undef HAVE_STRERROR
/* Define to 1 if you have the `stricmp' function. */
#undef HAVE_STRICMP
/* "" */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the `strsignal' function. */
#undef HAVE_STRSIGNAL
/* Define to 1 if you have the `strspn' function. */
#undef HAVE_STRSPN
/* Define to 1 if you have the `sys_errlist' function. */
#undef HAVE_SYS_ERRLIST
/* "" */
#undef HAVE_SYS_SELECT_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* "" */
#undef HAVE_SYS_SYSPROTO_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the `umask' function. */
#undef HAVE_UMASK
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* "First IRCD type" */
#undef IRC_BAHAMUT
/* "First IRCD type" */
#undef IRC_DREAMFORGE
/* "First IRCD type" */
#undef IRC_HYBRID
/* "First IRCD type" */
#undef IRC_PTLINK
/* "Second IRCD type" */
#undef IRC_RAGE2
/* "Second IRCD type" */
#undef IRC_ULTIMATE
/* "Second IRCD type" */
#undef IRC_ULTIMATE3
/* "Second IRCD type" */
#undef IRC_UNREAL
/* "Second IRCD type" */
#undef IRC_VIAGRA
/* "Module dir" */
#undef MODULE_PATH
/* "mysql.h is in a mysql/ folder" */
#undef MYSQL_HEADER_PREFIX
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* "Run group" */
#undef RUNGROUP
/* "Binary Dir" */
#undef SERVICES_BIN
/* "services bin dir" */
#undef SERVICES_DIR
/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of a `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* "modules not available" */
#undef STATIC_LINKING
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* "has encryption" */
#undef USE_ENCRYPTION
/* "Modules available" */
#undef USE_MODULES
/* "Use Mysql" */
#undef USE_MYSQL
/* "Use RDB" */
#undef USE_RDB
/* "Use threads" */
#undef USE_THREADS
/* Define to `short' if <sys/types.h> does not define. */
#undef int16_t
/* Define to `long' if <sys/types.h> does not define. */
#undef int32_t
/* Define to `unsigned short' if <sys/types.h> does not define. */
#undef u_int16_t
/* Define to `unsigned long' if <sys/types.h> does not define. */
#undef u_int32_t
/* Static config, copy from here to below before running autoheader! */
#ifdef USE_ENCRYPTION
#define ENCRYPT_MD5
#endif
#ifdef HAS_SYS_TYPES_H
#include <sys/types.h>
#endif
typedef int16_t int16;
typedef u_int16_t uint16;
typedef int32_t int32;
typedef u_int32_t uint32;
+1 -1
View File
@@ -8,7 +8,7 @@
* Based on the original code of Epona by Lara.
* Based on the original code of Services by Andy Church.
*
* $Id: timeout.h,v 1.4 2003/07/20 01:15:50 dane Exp $
* $Id$
*
*/
View File
View File
+5 -2
View File
@@ -1,7 +1,10 @@
# Makefile for language module
include ../Makefile.inc
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'USE_MODULES=${USE_MODULES}'
LANGOBJS = cat de en_us es fr gr nl pt tr it ru
LANGSRCS = cat de en_us.l es fr.l gr.l nl.l pt.l tr.l it.l ru.l
-26
View File
@@ -1,26 +0,0 @@
include ../Makefile.inc
include ./Makefile.inc
OBJECTS= $(SRCS:.c=.o)
SO_FILES=$(OBJECTS:.o=.s)
CDEFS= -g -rdynamic -Wall
CFLAGS=$(BASE_CFLAGS) $(CDEFS)
all: $(OBJECTS)
install: $(SO_FILES)
$(CP_ALL) ./*.so $(MODULE_PATH)
distclean: clean spotless
.c.o:
$(CC) $(CFLAGS) -c $<
.o.s:
ld -shared $< -o $*.so
clean:
rm -f *.o core
spotless: clean
rm -f *.so Makefile.inc
+107
View File
@@ -0,0 +1,107 @@
MYSQL_OBJ = $(MYSQL:.c=.o)
RDB_OBJ = $(RDB:.c=.o)
OBJS = actions.o botserv.o channels.o chanserv.o commands.o compat.o converter.o \
config.o datafiles.o encrypt.o helpserv.o hostserv.o init.o language.o list.o log.o mail.o main.o \
memory.o memoserv.o messages.o misc.o modules.o news.o nickserv.o operserv.o \
process.o protocol.o proxy.o send.o servers.o sessions.o slist.o sockutil.o \
timeout.o users.o \
$(VSNPRINTF_O) $(RDB_OBJ) $(MYSQL_OBJ)
SRCS = actions.c botserv.c channels.c chanserv.c commands.c compat.c converter.c \
config.c datafiles.c encrypt.c helpserv.c hostserv.c init.c language.c list.c log.c mail.c main.c \
memory.c memoserv.c messages.c misc.c modules.c news.c nickserv.c operserv.c \
process.c protocol.c proxy.c send.c servers.c sessions.c slist.c sockutil.c \
timeout.c users.c \
$(VSNPRINTF_C) $(RDB) $(MYSQL)
INCLUDES = ../include/commands.h ../include/defs.h ../include/language.h \
../include/pseudo.h ../include/sysconf.h ../include/config.h \
../include/encrypt.h ../include/messages.h ../include/services.h \
../include/timeout.h ../include/datafiles.h ../include/extern.h \
../include/modules.h ../include/slist.h ../include/version.h
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}' 'MYSQL=${MYSQL}'\
'RDB=${RDB}'
.c.o:
$(CC) $(CFLAGS) -I../include/ -c $<
all: services
services: $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(ANOPELIBS) $(MLIBS) -o $@ $(ELIBS)
$(OBJS): Makefile
actions.o: actions.c $(INCLUDES)
botserv.o: botserv.c $(INCLUDES)
channels.o: channels.c $(INCLUDES)
chanserv.o: chanserv.c $(INCLUDES)
commands.o: commands.c $(INCLUDES)
compat.o: compat.c $(INCLUDES)
config.o: config.c $(INCLUDES)
converter.o: converter.c $(INCLUDES)
datafiles.o: datafiles.c $(INCLUDES)
encrypt.o: encrypt.c $(INCLUDES)
init.o: init.c $(INCLUDES)
hostserv.o: hostserv.c $(INCLUDES)
language.o: language.c $(INCLUDES)
list.o: list.c $(INCLUDES)
log.o: log.c $(INCLUDES)
mail.o: mail.c $(INCLUDES)
main.o: main.c $(INCLUDES)
memory.o: memory.c $(INCLUDES)
memoserv.o: memoserv.c $(INCLUDES)
messages.o: messages.c $(INCLUDES)
misc.o: misc.c $(INCLUDES)
news.o: news.c $(INCLUDES)
nickserv.o: nickserv.c $(INCLUDES)
operserv.o: operserv.c $(INCLUDES)
process.o: process.c $(INCLUDES)
protocol.o: protocol.c $(INCLUDES)
proxy.o: proxy.c $(INCLUDES)
send.o: send.c $(INCLUDES)
sessions.o: sessions.c $(INCLUDES)
slist.o: slist.c $(INCLUDES)
sockutil.o: sockutil.c $(INCLUDES)
timeout.o: timeout.c $(INCLUDES)
users.o: users.c $(INCLUDES)
vsnprintf.o: vsnprintf.c $(INCLUDES)
mysql.o: mysql.c $(INCLUDES)
rdb.o: rdb.c $(INCLUDES)
modules: DUMMY
(cd modules ; ./configure ; ${MAKE} ${MAKEARGS} all)
clean:
(cd modules ; ${MAKE} ${MAKEARGS} clean)
rm -f *.o services a.out
install: services
test -d ${BINDEST} || mkdir ${BINDEST}
$(INSTALL) services $(BINDEST)/services
$(INSTALL) bin/anoperc $(BINDEST)/anoperc
rm -f $(BINDEST)/listnicks $(BINDEST)/listchans
ln $(BINDEST)/services $(BINDEST)/listnicks
ln $(BINDEST)/services $(BINDEST)/listchans
(cd ../lang ; $(MAKE) install)
$(CP) ../data/* $(DATDEST)
test -d $(DATDEST)/backups || mkdir $(DATDEST)/backups
test -d $(DATDEST)/logs || mkdir $(DATDEST)/logs
@if [ "$(MODULE_PATH)" ] ; then \
test -d ${MODULE_PATH} || mkdir ${MODULE_PATH} ; \
test -d ${MODULE_PATH}/runtime || mkdir ${MODULE_PATH}/runtime ; \
(cd modules ; $(MAKE) install) ; \
fi
@if [ "$(RUNGROUP)" ] ; then \
echo chgrp -R $(RUNGROUP) $(DATDEST) ; \
chgrp -R $(RUNGROUP) $(DATDEST) ; \
echo chmod -R g+rw $(DATDEST) ; \
chmod -R g+rw $(DATDEST) ; \
echo find $(DATDEST) -type d -exec chmod g+xs \'\{\}\' \\\; ; \
find $(DATDEST) -type d -exec chmod g+xs '{}' \; ; \
fi
DUMMY:
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
View File
+1 -7
View File
@@ -14,12 +14,6 @@
#include "modules.h"
#include "language.h"
#ifdef __OpenBSD__
#define DL_PREFIX "_" /* so OpenBSD can lookup the symbols */
#else
#define DL_PREFIX ""
#endif /* __OpenBSD__ */
#ifdef USE_MODULES
#include <dlfcn.h>
/* Define these for systems without them */
@@ -1845,7 +1839,7 @@ char *moduleGetData(ModuleData * md[], char *key)
ModuleData *lastHash = NULL;
ModuleDataItem *itemCurrent = NULL;
index = CMD_HASH(mod_name);
if(!md) { return NULL; }
for (current = md[index]; current; current = current->next) {
if (stricmp(current->moduleName, mod_name) == 0)
lastHash = current;
+32
View File
@@ -0,0 +1,32 @@
include ./Makefile.inc
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \
'RUNGROUP=${RUNGROUP}' 'MODULE_PATH=${MODULE_PATH}'
OBJECTS= $(SRCS:.c=.o)
SO_FILES=$(OBJECTS:.o=.s)
CDEFS= -g -rdynamic -Wall
CFLAGS=$(CFLAGS) $(CDEFS)
all: $(OBJECTS)
install: $(SO_FILES)
$(CP) ./*.so $(MODULE_PATH)
distclean: clean spotless
.c.o:
$(CC) $(CFLAGS) -I../${INCLUDEDIR} -c $<
.o.s:
ld -shared $< -o $*.so
clean:
rm -f *.o *.so *.c~ core
spotless: clean
rm -f *.so Makefile.inc
View File
View File
View File
View File
View File
View File
View File
+4
View File
@@ -16,6 +16,10 @@
#include "pseudo.h"
#include <fcntl.h>
#ifndef INADDR_NONE
#define INADDR_NONE 0xFFFFFFFF
#endif
/* Hashed list of HostCache; threads must not use it! */
HostCache *hcache[1024];
View File
View File
View File
View File
View File
View File
View File
View File
View File
+5 -1
View File
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="4"
VERSION_BUILD="262"
VERSION_BUILD="264"
# $Log$
#
# BUILD : 1.7.4 (264)
# BUGS : N/A
# NOTES : Switched to autoconf - try to commit part 1
#
# BUILD : 1.7.4 (262)
# BUGS : 125
# NOTES : Fixed the /ns release issue with UseSVSHOLD