Patch for server-name and server-file

Thomas Wiegner <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Powered by Penguin
Message-ID <20080820200103.GA6077@fliewatuet>
Hi John,

the old slrn had the following options in the configure script:

#v+
 --with-server-name=HOST Hostname of a default NNTP server
 --with-server-file=FILE File containing the hostname of an NNTP server
#v-

The code to handle this is still in the sources, but these option
seem somehow gone lost in the configure script. 

The attached patch enables these two options again in the configure
script.

Cheers,

 Thomas

-- 
[X] Nail here for new Monitor

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
NNTPSERVER.patch (text/x-diff, 3.9 KB)
Index: configure
===================================================================
--- configure	(revision 294)
+++ configure	(working copy)
@@ -686,6 +686,8 @@
 SLRNPULL
 SLRNPULL_ROOT_DIR
 MAN_SLRNPULL
+NNTPSERVER_FILE
+NNTPSERVER_NAME
 SLRN_HAS_NNTP_SUPPORT
 SLRN_HAS_SPOOL_SUPPORT
 SLRN_HAS_INEWS_SUPPORT
@@ -1374,6 +1376,8 @@
   --with-slang=DIR      Use DIR/lib and DIR/include for slang
   --with-slanglib=DIR   slang library in DIR
   --with-slanginc=DIR   slang include files in DIR
+  --with-server-name=HOST Hostname of a default NNTP server
+  --with-server-file=FILE File containing the hostname of an NNTP server
 
 Some influential environment variables:
   CC          C compiler command
@@ -5906,8 +5910,24 @@
 SLRN_HAS_PULL_SUPPORT=$optionvalue
 
 
+optionvalue="localhost"
+# Check whether --with-server-name was given.
+if test "${with_server_name+set}" = set; then
+  withval=$with_server_name; if test "x$withval" != "xno"; then
+        optionvalue="$withval"
+    fi
+fi
+NNTPSERVER_NAME=$optionvalue
 
 
+optionvalue="NONE"
+# Check whether --with-server-file was given.
+if test "${with_server_file+set}" = set; then
+  withval=$with_server_file; if test "x$withval" != "xno"; then
+        optionvalue="$withval"
+    fi
+fi
+NNTPSERVER_FILE=$optionvalue
 
 
  optionvalue=1
@@ -14140,6 +14160,8 @@
 SLRNPULL!$SLRNPULL$ac_delim
 SLRNPULL_ROOT_DIR!$SLRNPULL_ROOT_DIR$ac_delim
 MAN_SLRNPULL!$MAN_SLRNPULL$ac_delim
+NNTPSERVER_FILE!$NNTPSERVER_FILE$ac_delim
+NNTPSERVER_NAME!$NNTPSERVER_NAME$ac_delim
 SLRN_HAS_NNTP_SUPPORT!$SLRN_HAS_NNTP_SUPPORT$ac_delim
 SLRN_HAS_SPOOL_SUPPORT!$SLRN_HAS_SPOOL_SUPPORT$ac_delim
 SLRN_HAS_INEWS_SUPPORT!$SLRN_HAS_INEWS_SUPPORT$ac_delim
@@ -14167,7 +14189,7 @@
 LTLIBICONV!$LTLIBICONV$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 99; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -15498,6 +15520,8 @@
 SLRNPULL!$SLRNPULL$ac_delim
 SLRNPULL_ROOT_DIR!$SLRNPULL_ROOT_DIR$ac_delim
 MAN_SLRNPULL!$MAN_SLRNPULL$ac_delim
+NNTPSERVER_FILE!$NNTPSERVER_FILE$ac_delim
+NNTPSERVER_NAME!$NNTPSERVER_NAME$ac_delim
 SLRN_HAS_NNTP_SUPPORT!$SLRN_HAS_NNTP_SUPPORT$ac_delim
 SLRN_HAS_SPOOL_SUPPORT!$SLRN_HAS_SPOOL_SUPPORT$ac_delim
 SLRN_HAS_INEWS_SUPPORT!$SLRN_HAS_INEWS_SUPPORT$ac_delim
@@ -15525,7 +15549,7 @@
 LTLIBICONV!$LTLIBICONV$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 99; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -16857,6 +16881,8 @@
 SLRNPULL!$SLRNPULL$ac_delim
 SLRNPULL_ROOT_DIR!$SLRNPULL_ROOT_DIR$ac_delim
 MAN_SLRNPULL!$MAN_SLRNPULL$ac_delim
+NNTPSERVER_FILE!$NNTPSERVER_FILE$ac_delim
+NNTPSERVER_NAME!$NNTPSERVER_NAME$ac_delim
 SLRN_HAS_NNTP_SUPPORT!$SLRN_HAS_NNTP_SUPPORT$ac_delim
 SLRN_HAS_SPOOL_SUPPORT!$SLRN_HAS_SPOOL_SUPPORT$ac_delim
 SLRN_HAS_INEWS_SUPPORT!$SLRN_HAS_INEWS_SUPPORT$ac_delim
@@ -16884,7 +16910,7 @@
 LTLIBICONV!$LTLIBICONV$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 99; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Index: src/slrnfeat.hin
===================================================================
--- src/slrnfeat.hin	(revision 294)
+++ src/slrnfeat.hin	(working copy)
@@ -16,6 +16,8 @@
 #define SLRN_HAS_NNTP_SUPPORT	@SLRN_HAS_NNTP_SUPPORT@
 #define SLRN_HAS_SPOOL_SUPPORT	@SLRN_HAS_SPOOL_SUPPORT@
 #define SLRN_HAS_INEWS_SUPPORT	@SLRN_HAS_INEWS_SUPPORT@
+#define NNTPSERVER_NAME	"@NNTPSERVER_NAME@"
+#define NNTPSERVER_FILE	"@NNTPSERVER_FILE@"
 
  /* NOTE: if you have enabled slrnpull, spool support must also be enabled. */
 #if SLRN_HAS_PULL_SUPPORT
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.