Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 19 Mar 2005 01:23:57 +0000 (01:23 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 19 Mar 2005 01:23:57 +0000 (01:23 +0000)
moved most of the NNTP-specific code to a nntp subdirectory, similar to the IMAP code.

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@204 e385b8ad-14ed-0310-8656-cc95a2468c6d

Makefile.am
configure.in
imap/Makefile.am
nntp/ChangeLog.nntp [moved from ChangeLog.nntp with 100% similarity]
nntp/Makefile.am [new file with mode: 0644]
nntp/newsrc.c [moved from newsrc.c with 100% similarity]
nntp/nntp.c [moved from nntp.c with 100% similarity]
nntp/nntp.h [moved from nntp.h with 100% similarity]

index e04208c..3fd390d 100644 (file)
@@ -14,7 +14,12 @@ POP_SUBDIR = pop
 POP_INCLUDES = -I$(top_srcdir)/pop
 endif
 
-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(POP_SUBDIR)
+if BUILD_NNTP
+NNTP_SUBDIR = nntp
+NNTP_INCLUDES = -I$(top_srcdir)/nntp
+endif
+
+SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(POP_SUBDIR) $(NNTP_SUBDIR)
 
 bin_SCRIPTS = muttngbug fleang
 
@@ -35,10 +40,10 @@ muttng_SOURCES = $(BUILT_SOURCES) \
        muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c md5c.c \
        url.c ascii.c mutt_idna.c sidebar.c hcache.c crypt-mod.c crypt-mod.h
 
-muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(MUTTLIBS) \
-       $(INTLLIBS) $(LIBICONV)
+muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(LIBNNTP) \
+       $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
 
-muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAPDEPS) $(LIBPOPDEPS) \
+muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAPDEPS) $(LIBPOPDEPS) $(LIBNNTPDEPS) \
        $(INTLDEPS)
 
 makedoc_SOURCES = makedoc.c
@@ -58,7 +63,7 @@ DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
        -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
        -DHAVE_CONFIG_H=1
 
-INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(POP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
+INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(POP_INCLUDES) $(NNTP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
 
 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
 
@@ -67,7 +72,7 @@ EXTRA_muttng_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
        mutt_tunnel.c smime.c pgp.c pgpinvoke.c pgpkey.c \
        pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
        browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c \
-       pgppacket.c mutt_idna.h nntp.c newsrc.c mutt_libesmtp.c \
+       pgppacket.c mutt_idna.h mutt_libesmtp.c \
        sidebar.h crypt-mod-pgp-classic.c crypt-mod-smime-classic.c
 
 EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
@@ -79,7 +84,6 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
        mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
        mx.h pager.h pgp.h protos.h reldate.h rfc1524.h rfc2047.h \
        rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare \
-       nntp.h ChangeLog.nntp \
        _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
        mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \
        makedoc.c stamp-doc-rc README.SSL smime.h\
index 45c9d6a..0ab911c 100644 (file)
@@ -519,10 +519,13 @@ AM_CONDITIONAL(BUILD_IMAP, test x$need_imap = xyes)
 AC_ARG_ENABLE(nntp, [  --enable-nntp              Enable NNTP support],
 [      if test x$enableval = xyes ; then
                AC_DEFINE(USE_NNTP)
-               MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS nntp.o newsrc.o"
+                LIBNNTP="-Lnntp -lnntp"
+                LIBNNTPDEPS="\$(top_srcdir)/nntp/nntp.h nntp/libnntp.a"
+                need_nntp="yes"
                need_socket="yes"
        fi
 ])
+AM_CONDITIONAL(BUILD_NNTP, test x$need_nntp = xyes)
 
 dnl -- end socket dependencies --
 
@@ -914,6 +917,8 @@ AC_SUBST(LIBIMAP)
 AC_SUBST(LIBIMAPDEPS)
 AC_SUBST(LIBPOP)
 AC_SUBST(LIBPOPDEPS)
+AC_SUBST(LIBNNTP)
+AC_SUBST(LIBNNTPDEPS)
 
 dnl -- iconv/gettext --
 
@@ -1157,5 +1162,6 @@ AC_OUTPUT(Makefile intl/Makefile m4/Makefile
         muttbug.sh
         imap/Makefile
         pop/Makefile
+        nntp/Makefile
         Muttngrc.head
         doc/instdoc.sh)
index 4d7db31..bf622a9 100644 (file)
@@ -16,7 +16,7 @@ endif
 
 EXTRA_DIST = BUGS README TODO auth_anon.c auth_cram.c auth_gss.c auth_sasl.c
 
-INCLUDES = -I$(top_srcdir) -I../intl
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/intl -I$(top_srcdir)/nntp
 
 noinst_LIBRARIES = libimap.a
 noinst_HEADERS = auth.h imap_private.h message.h
similarity index 100%
rename from ChangeLog.nntp
rename to nntp/ChangeLog.nntp
diff --git a/nntp/Makefile.am b/nntp/Makefile.am
new file mode 100644 (file)
index 0000000..22799cb
--- /dev/null
@@ -0,0 +1,12 @@
+## Process this file with automake to produce Makefile.in
+
+AR=@AR@
+
+AUTOMAKE_OPTIONS = foreign
+
+INCLUDES = -I$(top_srcdir) -I../intl
+
+noinst_LIBRARIES = libnntp.a
+noinst_HEADERS = nntp.h
+
+libnntp_a_SOURCES = nntp.c newsrc.c nntp.h
similarity index 100%
rename from newsrc.c
rename to nntp/newsrc.c
similarity index 100%
rename from nntp.c
rename to nntp/nntp.c
similarity index 100%
rename from nntp.h
rename to nntp/nntp.h