diff options
author | Fritz Elfert <felfert@to.com> | 2000-08-02 03:39:20 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2000-08-02 03:39:20 +0000 |
commit | b6e35c977928bc4fb15b5346128db9823412e6b4 (patch) | |
tree | a76fada4bf540347bdf44ee9fff5c15a2100acb9 | |
parent | dbc2d14e0727d8e2f4b8e805c433e50c8664d64d (diff) | |
download | plptools-b6e35c977928bc4fb15b5346128db9823412e6b4.tar.gz plptools-b6e35c977928bc4fb15b5346128db9823412e6b4.tar.bz2 plptools-b6e35c977928bc4fb15b5346128db9823412e6b4.zip |
Get rid of second configuration header defs.h[.in].
Configuration now is in config.h and this is included as the very first header.
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | acconfig.h | 48 | ||||
-rw-r--r-- | configure.in | 45 | ||||
-rw-r--r-- | include/defs.h.in | 43 | ||||
-rw-r--r-- | lib/ppsocket.cc | 4 | ||||
-rw-r--r-- | lib/rfsv.h | 2 | ||||
-rw-r--r-- | lib/rfsv16.cc | 5 | ||||
-rw-r--r-- | lib/rfsv32.cc | 5 | ||||
-rw-r--r-- | lib/rfsvfactory.cc | 5 | ||||
-rw-r--r-- | lib/rpcs.cc | 5 | ||||
-rw-r--r-- | lib/rpcs16.cc | 5 | ||||
-rw-r--r-- | lib/rpcs32.cc | 5 | ||||
-rw-r--r-- | lib/rpcsfactory.cc | 5 | ||||
-rw-r--r-- | ncpd/link.cc | 5 | ||||
-rw-r--r-- | ncpd/main.cc | 5 | ||||
-rw-r--r-- | ncpd/ncp.cc | 5 | ||||
-rw-r--r-- | plpftp/ftp.cc | 5 | ||||
-rw-r--r-- | plpftp/main.cc | 5 | ||||
-rw-r--r-- | plpnfsd/main.cc | 7 | ||||
-rw-r--r-- | plpnfsd/mp_main.c | 6 | ||||
-rw-r--r-- | plpnfsd/mp_mount.c | 6 |
21 files changed, 144 insertions, 80 deletions
diff --git a/Makefile.am b/Makefile.am index 978ab40..aa51884 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,3 +12,6 @@ AUTOMAKE_OPTIONS = foreign maintainer-clean-local: rm -f configure aclocal.m4 config.guess config.sub Makefile.in \ install-sh ltconfig ltmain.sh missing mkinstalldirs + +kdoc: + kdoc -d doc/api -n libplp -P lib/*.h @@ -1,3 +1,8 @@ +#ifndef _CONFIG_H_ +#define _CONFIG_H_ + +@TOP@ + /* Define this, if you have libreadline */ #undef HAVE_LIBREADLINE @@ -7,6 +12,49 @@ /* Define if the C++ compiler supports BOOL */ #undef HAVE_BOOL +/* The package version */ #undef VERSION +/* The package name */ #undef PACKAGE + +/* Define this to your mtab's path */ +#undef MTAB_PATH + +/* Define this to your temporary mtab's path */ +#undef MTAB_TMP + +/* Define this to your serial device node */ +#undef DDEV + +/* Define this to your serial device speed */ +#undef DSPEED + +/* Define this to the TCP port ncpd should listen on */ +#undef DPORT + +/* Define this to your default drive on your Psion */ +#undef DDRIVE + +/* Define this to your default directory on your Psion */ +#undef DBASEDIR + +/* Define this to your default mountpoint for plpnfsd */ +#undef DMOUNTPOINT + +@BOTTOM@ +/* Some reasonable defaults */ + +#ifndef PSIONHOSTNAME +# define PSIONHOSTNAME "localhost" +#endif + +/* misc tweaks */ + +#ifdef _IBMR2 +# undef DONT_UPDATE_MTAB +# define DONT_UPDATE_MTAB /* The mount table is obtained from the kernel (!?) */ +#endif + +#endif /* _CONFIG_H_ */ + diff --git a/configure.in b/configure.in index 6a720c1..6d4b5fe 100644 --- a/configure.in +++ b/configure.in @@ -1,16 +1,16 @@ -AC_REVISION($ Revision: 0.1 $)dnl revision of this configure.in script +AC_REVISION($Revision$)dnl revision of this configure.in script AC_INIT(acinclude.m4) +AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(include/config.h) AM_INIT_AUTOMAKE(plptools, 0.6) AM_PROG_LIBTOOL -dnl Enable Mainatiner stuff -dnl **** NOTE **** Matt had to comment the following line out to get it to -dnl ************** build, and doesn't know why - YMMV. +dnl Enable Maintainer stuff AM_MAINTAINER_MODE dnl checks for programs +AC_AIX AC_PROG_MAKE_SET AC_CHECK_COMPILERS @@ -56,8 +56,16 @@ dnl checks for mount table AC_MSG_CHECKING(for mount table) AC_FIND_FILE(/etc/mnttab /etc/mtab, MTAB) AC_MSG_RESULT($MTAB) -test "$MTAB" = "NO" && CFLAGS="${CFLAGS} -DDONT_UPDATE_MTAB"; -AC_SUBST(MTAB) +test "$MTAB" = "NO" && AC_DEFINE_UNQUOTED(DONT_UPDATE_MTAB) +AC_DEFINE_UNQUOTED(MTAB_PATH,"$MTAB") +case "$target_alias" in + *linux*) + AC_DEFINE_UNQUOTED(MTAB_TMP,"${MTAB}~") + ;; + *) + AC_DEFINE_UNQUOTED(MTAB_TMP,"${MTAB}.plpnfsd") + ;; +esac dnl checks for header files AC_CHECK_HEADERS(sys/ioctl.h sys/errno.h sys/ttold.h stdlib.h) @@ -65,7 +73,7 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/errno.h sys/ttold.h stdlib.h) dnl special options for customization AC_ARG_WITH(serial, - [ --with-serial=DEV override default serial line ], + [ --with-serial=DEV override default serial line], [ DDEV="$withval" AC_MSG_RESULT(Overriding serial line: $DDEV) ], @@ -75,7 +83,7 @@ AC_ARG_WITH(serial, test "$DDEV" = "NO" && AC_MSG_ERROR(NO serial lines. Use --with-serial.) ] ) -AC_SUBST(DDEV) +AC_DEFINE_UNQUOTED(DDEV,"$DDEV") AC_ARG_WITH(speed, [ --with-speed=SPEED override default serial speed [115200]], @@ -85,7 +93,7 @@ AC_ARG_WITH(speed, AC_MSG_RESULT(Using default serial speed: $DSPEED) ] ) -AC_SUBST(DSPEED) +AC_DEFINE_UNQUOTED(DSPEED,$DSPEED) AC_ARG_WITH(port, [ --with-port=PORT override default port [7501]], @@ -95,7 +103,7 @@ AC_ARG_WITH(port, AC_MSG_RESULT(Using default port: $DPORT) ] ) -AC_SUBST(DPORT) +AC_DEFINE_UNQUOTED(DPORT,$DPORT) AC_ARG_WITH(drive, [ --with-drive=DRIVE override default Psion drive [AUTO]], @@ -105,7 +113,7 @@ AC_ARG_WITH(drive, AC_MSG_RESULT(Using default Psion drive: $DDRIVE) ] ) -AC_SUBST(DDRIVE) +AC_DEFINE_UNQUOTED(DDRIVE,"$DDRIVE") AC_ARG_WITH(basedir, [ --with-basedir=DIR override default Psion directory [\\\\]], @@ -115,17 +123,17 @@ AC_ARG_WITH(basedir, AC_MSG_RESULT(Using default Psion directory: $DBASEDIR) ] ) -AC_SUBST(DBASEDIR) +AC_DEFINE_UNQUOTED(DBASEDIR,"$DBASEDIR") AC_ARG_WITH(mountdir, - [ --with-mountdir=DDIR override default mount point [/mnt/psion]], - [ DDIR="$withval" - AC_MSG_RESULT(Overriding mount point: $DDIR) ], - [ DDIR="/mnt/psion" - AC_MSG_RESULT(Using default mount point: $DDIR) + [ --with-mountdir=DIR override default mount point [/mnt/psion]], + [ DMOUNTPOINT="$withval" + AC_MSG_RESULT(Overriding mount point: $DMOUNTPOINT) ], + [ DMOUNTPOINT="/mnt/psion" + AC_MSG_RESULT(Using default mount point: $DMOUNTPOINT) ] ) -AC_SUBST(DDIR) +AC_DEFINE_UNQUOTED(DMOUNTPOINT,"$DMOUNTPOINT") AC_OUTPUT( @@ -135,6 +143,5 @@ AC_OUTPUT( plpftp/Makefile plpnfsd/Makefile include/config.h - include/defs.h etc/psion ) diff --git a/include/defs.h.in b/include/defs.h.in deleted file mode 100644 index d1c3549..0000000 --- a/include/defs.h.in +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef _defs_h_ -#define _defs_h_ - -/* - * NFS related stuff - */ -#define MTAB_PATH "@MTAB@" -#ifdef linux -# define MTAB_TMP "@MTAB@~" -#else -# define MTAB_TMP "@MTAB@.p3nfsd" -#endif - -#ifdef _IBMR2 -# define DONT_UPDATE_MTAB /* The mount table is obtained from the kernel (!?) */ -#endif - -#define DUSER "root" - -#ifndef PSIONHOSTNAME -# define PSIONHOSTNAME "localhost" -#endif - -/* - * defaults for ncpd - */ -#define DDEV "@DDEV@" -#define DSPEED @DSPEED@ -#define DPORT @DPORT@ -#define DDRIVE "@DDRIVE@" -#define DBASEDIR "@DBASEDIR@" -#define DDIR "@DDIR@" - - -/* Debugging */ - -#define PACKET_LAYER_DIAGNOSTICS false -#define LINK_LAYER_DIAGNOSTICS false -// #define SOCKET_DIAGNOSTICS - -#include "config.h" -#endif - diff --git a/lib/ppsocket.cc b/lib/ppsocket.cc index 1249f18..060074a 100644 --- a/lib/ppsocket.cc +++ b/lib/ppsocket.cc @@ -19,6 +19,9 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <string.h> @@ -32,7 +35,6 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include "defs.h" #include "bool.h" #include "bufferstore.h" #include "ppsocket.h" @@ -5,7 +5,7 @@ class ppsocket; class bufferStore; class bufferArray; -const unsigned long RFSV_SENDLEN = 2000; +const long RFSV_SENDLEN = 2000; /** * Defines the callback procedure for diff --git a/lib/rfsv16.cc b/lib/rfsv16.cc index f71be9f..de57bdf 100644 --- a/lib/rfsv16.cc +++ b/lib/rfsv16.cc @@ -23,6 +23,10 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -30,7 +34,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rfsv16.h" #include "bufferstore.h" diff --git a/lib/rfsv32.cc b/lib/rfsv32.cc index 3980eb9..fa4852f 100644 --- a/lib/rfsv32.cc +++ b/lib/rfsv32.cc @@ -19,6 +19,10 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -26,7 +30,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rfsv32.h" #include "bufferstore.h" diff --git a/lib/rfsvfactory.cc b/lib/rfsvfactory.cc index 2e2067e..a0d8480 100644 --- a/lib/rfsvfactory.cc +++ b/lib/rfsvfactory.cc @@ -18,6 +18,10 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -25,7 +29,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rfsv.h" #include "rfsv16.h" diff --git a/lib/rpcs.cc b/lib/rpcs.cc index 79630cf..cdbbabd 100644 --- a/lib/rpcs.cc +++ b/lib/rpcs.cc @@ -14,6 +14,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -21,7 +25,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rpcs.h" #include "bufferstore.h" diff --git a/lib/rpcs16.cc b/lib/rpcs16.cc index a3af320..d8d75cf 100644 --- a/lib/rpcs16.cc +++ b/lib/rpcs16.cc @@ -14,6 +14,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -21,7 +25,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rpcs16.h" #include "bufferstore.h" diff --git a/lib/rpcs32.cc b/lib/rpcs32.cc index 74d5ca4..22433ee 100644 --- a/lib/rpcs32.cc +++ b/lib/rpcs32.cc @@ -14,6 +14,10 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdio.h> #include <stdlib.h> @@ -22,7 +26,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rpcs32.h" #include "bufferstore.h" diff --git a/lib/rpcsfactory.cc b/lib/rpcsfactory.cc index 4fe0bff..520335e 100644 --- a/lib/rpcsfactory.cc +++ b/lib/rpcsfactory.cc @@ -19,6 +19,10 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <fstream.h> @@ -26,7 +30,6 @@ #include <time.h> #include <string.h> -#include "defs.h" #include "bool.h" #include "rpcs16.h" #include "rpcs32.h" diff --git a/ncpd/link.cc b/ncpd/link.cc index d07b78b..9b0e5f3 100644 --- a/ncpd/link.cc +++ b/ncpd/link.cc @@ -22,11 +22,14 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <stdlib.h> #include <stdio.h> -#include "defs.h" #include "bool.h" #include "link.h" #include "packet.h" diff --git a/ncpd/main.cc b/ncpd/main.cc index 2c0fd3d..ca1d2c4 100644 --- a/ncpd/main.cc +++ b/ncpd/main.cc @@ -22,13 +22,16 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <string.h> #include <stream.h> #include <stdlib.h> #include <signal.h> -#include "defs.h" #include "ncp.h" #include "bufferstore.h" #include "ppsocket.h" diff --git a/ncpd/ncp.cc b/ncpd/ncp.cc index 1a5c317..3370cd1 100644 --- a/ncpd/ncp.cc +++ b/ncpd/ncp.cc @@ -22,12 +22,15 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <string.h> #include <time.h> #include "bool.h" -#include "defs.h" #include "ncp.h" #include "linkchan.h" #include "bufferstore.h" diff --git a/plpftp/ftp.cc b/plpftp/ftp.cc index b46e24a..2022eb5 100644 --- a/plpftp/ftp.cc +++ b/plpftp/ftp.cc @@ -22,6 +22,10 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <sys/types.h> #include <dirent.h> #include <stream.h> @@ -36,7 +40,6 @@ #include <sys/stat.h> #include <signal.h> -#include "defs.h" #include "ftp.h" #include "rfsv.h" #include "rpcs.h" diff --git a/plpftp/main.cc b/plpftp/main.cc index 8d00574..cbd88f6 100644 --- a/plpftp/main.cc +++ b/plpftp/main.cc @@ -22,13 +22,16 @@ // // e-mail philip.proudman@btinternet.com +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> -#include "defs.h" #include "bool.h" #include "ppsocket.h" #include "rfsv.h" diff --git a/plpnfsd/main.cc b/plpnfsd/main.cc index 6bf0f01..ef9abdd 100644 --- a/plpnfsd/main.cc +++ b/plpnfsd/main.cc @@ -3,6 +3,10 @@ // Copyright (C) 1999 Fritz Elfert <felfert@to.com> // +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stream.h> #include <string.h> #include <stdlib.h> @@ -10,7 +14,6 @@ #include <signal.h> #include <syslog.h> -#include "defs.h" #include "bool.h" #include "rfsv.h" #include "rfsvfactory.h" @@ -284,7 +287,7 @@ void usage() int main(int argc, char**argv) { ppsocket *skt; char *user = 0L; - char *mdir = DDIR; + char *mdir = DMOUNTPOINT; int sockNum = DPORT; int verbose = 0; int status = 0; diff --git a/plpnfsd/mp_main.c b/plpnfsd/mp_main.c index 3c3cab9..80e3d82 100644 --- a/plpnfsd/mp_main.c +++ b/plpnfsd/mp_main.c @@ -6,6 +6,11 @@ * Modifications for plputils by Fritz Elfert <felfert@to.com> * */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <OSdefs.h> #include <stdio.h> #include <signal.h> @@ -16,7 +21,6 @@ #include <errno.h> #include "nfs_prot.h" #include "mp.h" -#include "defs.h" #if defined (__SVR4) || defined(__sgi) #include <stdlib.h> /* getenv */ #include <string.h> /* strcmp */ diff --git a/plpnfsd/mp_mount.c b/plpnfsd/mp_mount.c index 0f9e1e9..da5d2c8 100644 --- a/plpnfsd/mp_mount.c +++ b/plpnfsd/mp_mount.c @@ -6,6 +6,11 @@ * Modifications for plputils by Fritz Elfert <felfert@to.com> * */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #if defined(__SVR4) || defined(__sgi) || defined(linux) #include <stdlib.h> #include <unistd.h> @@ -38,7 +43,6 @@ extern int inet_addr(char *); #define umount(dir) unmount(dir) #endif -#include "defs.h" static char nfshost[128]; |