OSSP CVS Repository

ossp - Check-in [856]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 856
Date: 2001-Sep-05 11:10:28 (local)
2001-Sep-05 09:10:28 (UTC)
User:rse
Branch:
Comment: Add support for local OSSP Str and OSSP L2 library source copies.
Tickets:
Inspections:
Files:
ossp-pkg/lmtp2nntp/.configure      1.6 -> 1.7     0 inserted, 1 deleted
ossp-pkg/lmtp2nntp/Makefile.in      1.12 -> 1.13     25 inserted, 2 deleted
ossp-pkg/lmtp2nntp/aclocal.m4      1.5 -> 1.6     2 inserted, 2 deleted
ossp-pkg/lmtp2nntp/autogen.sh      1.4 -> 1.5     8 inserted, 0 deleted
ossp-pkg/lmtp2nntp/configure.ac      1.8 -> 1.9     26 inserted, 6 deleted

ossp-pkg/lmtp2nntp/.configure 1.6 -> 1.7

--- .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
 


ossp-pkg/lmtp2nntp/Makefile.in 1.12 -> 1.13

--- 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


ossp-pkg/lmtp2nntp/aclocal.m4 1.5 -> 1.6

--- 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


ossp-pkg/lmtp2nntp/autogen.sh 1.4 -> 1.5

--- 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"
+


ossp-pkg/lmtp2nntp/configure.ac 1.8 -> 1.9

--- 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)

CVSTrac 2.0.1