[ircd-ratbox] two autoconf patches: don't use local libtdl unconditionally and add --with-rundir option
Simon Bertrang
janus at errornet.de
Sun Feb 8 11:22:55 UTC 2009
Hi,
while porting ircd-ratbox i've adjusted the configure.ac script to
1) use the libtdl the system has already installed
2) accept a --with-rundir argument to specify where the pidfile is
written to
Further i've noticed that you don't actually need the most recent
autoconf/automake versions, 2.62/1.9 work just fine over here, but
that's another story.
Attached you find two diffs against trunk.
Kind regards,
Simon
-------------- next part --------------
Index: configure.ac
===================================================================
--- configure.ac (revision 26450)
+++ configure.ac (working copy)
@@ -83,8 +83,18 @@ AC_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
-AC_CONFIG_SUBDIRS(libltdl libratbox)
+have_ltdl=no
+AC_CHECK_HEADER(ltdl.h, [
+ AC_CHECK_LIB(ltdl, lt_dlopen, have_ltdl=yes, have_ltdl=no)
+], have_ltdl=no)
+
+if test "$have_ltdl" = no; then
+ AC_CONFIG_SUBDIRS(libltdl)
+fi
+
+AC_CONFIG_SUBDIRS(libratbox)
+
case "$host_os" in
*cygwin*)
AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
-------------- next part --------------
Index: configure.ac
===================================================================
--- configure.ac (revision 26450)
+++ configure.ac (working copy)
@@ -357,6 +367,24 @@ AC_HELP_STRING([--with-logdir=DIR],
AC_MSG_RESULT(no)
AC_DEFINE_DIR(LOG_DIR, logdir, [Prefix where to write logfiles.])
AC_SUBST_DIR([logdir])]
+)
+
+dnl **********************************************************************
+dnl Check for --with-rundir
+dnl **********************************************************************
+
+AC_MSG_CHECKING([whether to modify rundir])
+AC_ARG_WITH(rundir,
+AC_HELP_STRING([--with-rundir=DIR],
+ [Directory where to write runtime files.]),
+ [ rundir=`echo $withval | sed 's/\/$//'`
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_DIR(RUN_DIR, rundir, [Prefix where to write runtime files.])
+ AC_SUBST_DIR([rundir]) ],
+ [ rundir='${localstatedir}/run'
+ AC_MSG_RESULT(no)
+ AC_DEFINE_DIR(RUN_DIR, rundir, [Prefix where to write runtime files.])
+ AC_SUBST_DIR([rundir])]
)
dnl **********************************************************************
More information about the ircd-ratbox
mailing list