Index: ossp-pkg/lmtp2nntp/.configure RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/.configure,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/.configure,v' 2>/dev/null --- .configure 2001/08/28 14:22:45 1.6 +++ .configure 2001/09/05 09:10:28 1.7 @@ -4,7 +4,6 @@ fi PATH=/cw/bin:$PATH ./configure \ - --with-str=/cw \ --enable-debug \ --prefix=/tmp/lmtp2nntp Index: ossp-pkg/lmtp2nntp/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Makefile.in,v rcsdiff -q -kk '-r1.12' '-r1.13' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Makefile.in,v' 2>/dev/null --- Makefile.in 2001/09/04 09:46:06 1.12 +++ Makefile.in 2001/09/05 09:10:28 1.13 @@ -46,11 +46,31 @@ HDRS = lmtp.h nntp.h sa.h argz.h shpat_match.h msg.h trace.h OBJS = lmtp2nntp.o lmtp.o nntp.o sa.o argz.o shpat_match.o msg.o trace.o version.o -all: lmtp2nntp lmtp2nntp.1 +SUBDIRS = @SUBDIR_STR@ @SUBDIR_L2@ + +all: _SUBDIRS_all lmtp2nntp lmtp2nntp.1 .c.o: $(CC) $(CFLAGS) -c $< +# convinience rule for calling _SUBDIRS with various make targets +_SUBDIRS_all _SUBDIRS_check _SUBDIRS_install _SUBDIRS_uninstall _SUBDIRS_clean _SUBDIRS_distclean _SUBDIRS_depend: + @$(MAKE) $(MFLAGS) \ + _SUBDIRS_TARGET=`echo $@ | sed -e 's/^_SUBDIRS_//'` \ + _SUBDIRS_STEPDOWN + +# the work horse rule which steps down to the subdirs in a loop +_SUBDIRS_STEPDOWN: + @for subdir in $(SUBDIRS); do \ + test ! -f "$$subdir/Makefile" && continue; \ + echo "===> $(_SUBDIRS_DP)$$subdir ($(_SUBDIRS_TARGET))"; \ + (cd $$subdir; \ + $(MAKE) $(MFLAGS) \ + _SUBDIRS_DP="$(_SUBDIRS_DP)$$subdir/" \ + $(_SUBDIRS_TARGET) || exit 1) || exit 1; \ + echo "<=== $(_SUBDIRS_DP)$$subdir"; \ + done + $(PROG): Makefile $(OBJS) $(HDRS) $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LIBS) @@ -67,16 +87,19 @@ $(SHTOOL) install -c -m 644 lmtp2nntp.1 $(DESTDIR)$(mandir)/man1/ clean: + @$(MAKE) $(MFLAGS) _SUBDIRS_clean -rm -f *.core -rm -f dmalloc.log test/dmalloc.log -rm -f $(PROG) -rm -f $(OBJS) distclean: clean + @$(MAKE) $(MFLAGS) _SUBDIRS_distclean -rm -f config.h config.status config.log config.cache -rm -f Makefile realclean: distclean + @$(MAKE) $(MFLAGS) _SUBDIRS_realclean -rm -f lmtp2nntp.1 -rm -f config.h.in -rm -f configure @@ -89,7 +112,7 @@ @$(SHTOOL) fixperm -v .; \ V=`$(SHTOOL) version -lc -dshort version.c`; \ $(SHTOOL) tarball -o lmtp2nntp-$${V}.tar.gz -d lmtp2nntp-$${V} -u ossp -g ossp \ - -e 'CVS,\.cvsignore,\.[ao],^\.,autogen.sh,test,*.tar.gz' -c 'gzip --best' . + -e 'CVS,\.cvsignore,\.[ao],^\.,/\.,autogen.sh,test,*.tar.gz' -c 'gzip --best' . check: lmtp2nntp @cd test && ./run.sh Index: ossp-pkg/lmtp2nntp/aclocal.m4 RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/aclocal.m4,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/aclocal.m4,v' 2>/dev/null --- aclocal.m4 2001/09/04 09:46:06 1.5 +++ aclocal.m4 2001/09/05 09:10:28 1.6 @@ -226,7 +226,7 @@ AC_DEFUN(AC_CHECK_EXTLIB,[dnl AC_ARG_WITH($2, [dnl -[ --with-]$2[[=DIR] build with $1 library (default=no)]], [dnl +[ --with-]$2[[=DIR] build with external $1 library (default=no)]], [dnl if test ".$with_$2" = .yes; then # via config script $2_version=`($2-config --version) 2>/dev/null` @@ -298,7 +298,7 @@ with_$2=no fi ])dnl -AC_MSG_CHECKING(whether to build against $1 library) +AC_MSG_CHECKING(whether to build against external $1 library) if test ".$with_$2" = .yes; then ifelse([$5], , :, [$5]) else Index: ossp-pkg/lmtp2nntp/autogen.sh RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/autogen.sh,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/Attic/autogen.sh,v' 2>/dev/null --- autogen.sh 2001/09/04 09:46:06 1.4 +++ autogen.sh 2001/09/05 09:10:28 1.5 @@ -63,3 +63,11 @@ echo "GNU Shtool $shtoolize_version -> shtool" shtoolize -q all +# perform same operation in subdirs +echo "===> str (autogen.sh)" +(cd str && ./autogen.sh) +echo "<=== str" +echo "===> l2 (autogen.sh)" +(cd l2 && ./autogen.sh) +echo "<=== l2" + Index: ossp-pkg/lmtp2nntp/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/lmtp2nntp/configure.ac,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/lmtp2nntp/configure.ac,v' 2>/dev/null --- configure.ac 2001/09/04 09:46:06 1.8 +++ configure.ac 2001/09/05 09:10:28 1.9 @@ -44,14 +44,34 @@ AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_FUNCS(inet_pton inet_aton) -dnl # check for external Str library -AC_CHECK_EXTLIB([Generic String Library], - str, str_parse, str.h, , - [AC_MSG_RESULT(not found) - AC_MSG_ERROR([lmtp2nntp requires libstr!])]) +dnl # check for Str library +AC_CHECK_EXTLIB([OSSP Str], + str, str_parse, str.h, + [SUBDIR_STR=""], + [SUBDIR_STR="str" + CPPFLAGS="$CPPFLAGS -Istr" + CFLAGS="$CFLAGS -Istr" + LDFLAGS="$LDFLAGS -Lstr/.libs" + LIBS="$LIBS -lstr"]) +AC_SUBST(SUBDIR_STR) + +dnl # check for L2 library +AC_CHECK_EXTLIB([OSSP L2], + l2, l2_stream_log, l2.h, + [SUBDIR_L2=""], + [SUBDIR_L2="l2" + CPPFLAGS="$CPPFLAGS -Il2" + CFLAGS="$CFLAGS -Il2" + LDFLAGS="$LDFLAGS -Ll2/.libs" + LIBS="$LIBS -ll2"]) +AC_SUBST(SUBDIR_L2) dnl # check for external Dmalloc library -AC_CHECK_EXTLIB([Dmalloc Library], dmalloc, dmalloc_debug, dmalloc.h, AC_DEFINE(DMALLOC)) +AC_CHECK_EXTLIB([Dmalloc], dmalloc, dmalloc_debug, dmalloc.h, AC_DEFINE(DMALLOC)) + +enable_shared=no +export enable_shared +AC_CONFIG_SUBDIRS($SUBDIR_STR $SUBDIR_L2) dnl # standard output generation AC_CONFIG_HEADERS(config.h)