[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 14:42:13 UTC 2009


On Sun, Feb 08, 2009 at 12:26:13PM +0100, Simon Bertrang wrote:
> On Sun, Feb 08, 2009 at 12:22:55PM +0100, Simon Bertrang wrote:
> > 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.
> > 
> 
> Sigh, forgot to merge the config.h patch from my other working copy...
> add the attached diff on top.
> 

After some hours of fighting with auto*beep*tools i didn't get actually
working results... so forget the libltdl thing for now; i'll come up with
a new diff when it eventually works.

Just for completeness i've attached the full rundir diff again, which
works after autoheader/autoconf/automake combo (why does this reminds me
of tekken and similar fighting games?).

Regards,
Simon
-------------- next part --------------
Index: configure.ac
===================================================================
--- configure.ac	(revision 26450)
+++ configure.ac	(working copy)
@@ -360,6 +360,24 @@ AC_HELP_STRING([--with-logdir=DIR],
 )
 
 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 **********************************************************************
 dnl Check for --with-helpdir
 dnl **********************************************************************
 
Index: include/config.h
===================================================================
--- include/config.h	(revision 26450)
+++ include/config.h	(working copy)
@@ -61,7 +61,7 @@
 #define DBPATH   ETCPATH "/ban.db"
 #define MPATH    ETCPATH "/ircd.motd"	/* MOTD file */
 #define LPATH    LOGPATH "/ircd.log"	/* ircd logfile */
-#define PPATH    ETCPATH "/ircd.pid"	/* pid file */
+#define PPATH    RUN_DIR "/ircd.pid"	/* pid file */
 #define OPATH    ETCPATH "/opers.motd"	/* oper MOTD file */
 
 /* HANGONGOODLINK and HANGONGOODLINK


More information about the ircd-ratbox mailing list