[srvx-commits] CVS: services configure.in,1.53,1.54 Makefile.am,1.17,1.18
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-08-11 03:26:24
|
Update of /cvsroot/srvx/services
In directory usw-pr-cvs1:/tmp/cvs-serv8293
Modified Files:
configure.in Makefile.am
Log Message:
add configure --with-modules option (and sample module, for arcnet's use)
require automake-1.5 or higher (to make --with-modules and $(OBJEXT) work sanely)
make kick_func callbacks return void, not int
make conf_register_reload() call the config re(lo)ad function
add split_line() to mini-tools.c
make valid_user_for() remove allowauth from dict itself
Index: configure.in
===================================================================
RCS file: /cvsroot/srvx/services/configure.in,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -r1.53 -r1.54
*** configure.in 5 Aug 2002 03:04:46 -0000 1.53
--- configure.in 11 Aug 2002 03:26:16 -0000 1.54
***************
*** 63,84 ****
AC_STRUCT_TM
- dnl Solaris needs alloca.h included.. go figure
- AC_MSG_CHECKING(for working alloca.h)
- AC_TRY_RUN([
- #include <alloca.h>
- main()
- {
- char *x;
- x = alloca(1);
- exit(0);
- }
- ],
- AC_MSG_RESULT(yes)
- AC_DEFINE(CAN_INCLUDE_ALLOCA_H, 1, [Define if you must include <alloca.h> to get alloca]),
- AC_MSG_RESULT(no), :)
-
-
dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi
! AC_CHECK_HEADERS(fcntl.h malloc.h netdb.h netinet/in.h sys/resource.h sys/timeb.h sys/times.h sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h unistd.h getopt.h memory.h regex.h alloca.h arpa/inet.h,,)
dnl portability stuff, hurray! -Jedi
--- 63,68 ----
AC_STRUCT_TM
dnl Would rather not bail on headers, BSD has alot of the functions elsewhere. -Jedi
! AC_CHECK_HEADERS(fcntl.h malloc.h netdb.h netinet/in.h sys/resource.h sys/timeb.h sys/times.h sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h unistd.h getopt.h memory.h regex.h arpa/inet.h,,)
dnl portability stuff, hurray! -Jedi
***************
*** 94,98 ****
AC_CHECK_FUNCS(select socket strcspn strspn strtod strtoul,,AC_MSG_ERROR([a required function was not found. srvx build will fail.]))
! dnl Check if mmap() works. Autoconf has its own test for this.
AC_FUNC_MMAP
--- 78,83 ----
AC_CHECK_FUNCS(select socket strcspn strspn strtod strtoul,,AC_MSG_ERROR([a required function was not found. srvx build will fail.]))
! dnl Check for functions (and how to get them).
! AC_FUNC_ALLOCA
AC_FUNC_MMAP
***************
*** 241,249 ****
AC_MSG_RESULT(P10)
AC_DEFINE(WITH_PROTOCOL_P10, 1, [Define if using the P10 dialect of IRC])
PROTO_FILES=proto-p10.c
elif test "x$withval" = "xbahamut" ; then
AC_MSG_RESULT(Bahamut)
AC_DEFINE(WITH_PROTOCOL_BAHAMUT, 1, [Define if using the Bahamut dialect of IRC])
! PROTO_FILES=proto-bahamut.c
else
AC_MSG_ERROR([Unknown IRC dialect $withval])
--- 226,235 ----
AC_MSG_RESULT(P10)
AC_DEFINE(WITH_PROTOCOL_P10, 1, [Define if using the P10 dialect of IRC])
+ MODULE_OBJS="$MODULE_OBJS proto-p10.\$(OBJEXT)"
PROTO_FILES=proto-p10.c
elif test "x$withval" = "xbahamut" ; then
AC_MSG_RESULT(Bahamut)
AC_DEFINE(WITH_PROTOCOL_BAHAMUT, 1, [Define if using the Bahamut dialect of IRC])
! MODULE_OBJS="$MODULE_OBJS proto-bahamut.\$(OBJEXT)"
else
AC_MSG_ERROR([Unknown IRC dialect $withval])
***************
*** 282,285 ****
--- 268,298 ----
])
+ AC_MSG_CHECKING(for extra module files)
+ AC_ARG_ENABLE(modules,
+ [ --enable-modules=list,of,modules Enable extra modules],
+ [
+ OIFS="$IFS"
+ IFS=','
+ EXTRA_MODULE_OBJS=""
+ module_list=""
+ dnl Must use a separate file because autoconf can't stand newlines in an AC_SUBSTed variable.
+ MODULE_DEFINES="src/modules-list.h"
+ echo > $MODULE_DEFINES
+ touch $MODULE_DEFINES
+ for module in $enableval ; do
+ EXTRA_MODULE_OBJS="$EXTRA_MODULE_OBJS mod-$module.\$(OBJEXT)"
+ module_list="$module_list $module"
+ CNAME=`echo $module | tr a-z A-Z`
+ echo "#define WITH_MODULE_$CNAME 1" >> $MODULE_DEFINES
+ done
+ IFS="$OIFS"
+ MODULE_OBJS="$MODULE_OBJS modules.\$(OBJEXT) $EXTRA_MODULE_OBJS"
+ AC_DEFINE(EXTRA_MODULES, 1, [Define if there are extra modules to be initialized.])
+ AC_MSG_RESULT($module_list)
+ ],
+ [
+ AC_MSG_RESULT(none)
+ ])
+
MY_SUBDIRS=""
RX_INCLUDES=""
***************
*** 296,300 ****
fi
! AC_SUBST(PROTO_FILES)
AC_SUBST(MY_SUBDIRS)
AC_SUBST(RX_INCLUDES)
--- 309,313 ----
fi
! AC_SUBST(MODULE_OBJS)
AC_SUBST(MY_SUBDIRS)
AC_SUBST(RX_INCLUDES)
Index: Makefile.am
===================================================================
RCS file: /cvsroot/srvx/services/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** Makefile.am 31 May 2002 04:13:23 -0000 1.17
--- Makefile.am 11 Aug 2002 03:26:16 -0000 1.18
***************
*** 2,5 ****
--- 2,6 ----
SUBDIRS = @MY_SUBDIRS@
DIST_SUBDIRS = src rx
+ AUTOMAKE_OPTIONS = gnu 1.5
all: srvx
|