kopia lustrzana https://github.com/Hamlib/Hamlib
Formatting edits to misc.c, line up columns with tabs, etc.
Added section about autofixer.sh git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2812 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.11
rodzic
5b308fcbd8
commit
37435ede91
|
@ -157,9 +157,17 @@ version or you won't even be able to build from the SVN checkout.
|
|||
* Gnu make (or any modern one, BSD okay) # make --version
|
||||
* autoconf 2.54 # autoconf --version
|
||||
* automake 1.7 # automake --version
|
||||
* libtool 1.5 # libtool --version
|
||||
* libtool 1.5|2.2.6 # libtool --version
|
||||
* libltdl-dev 2.2.6 # (Debian package for new libtool)
|
||||
* svn for connection to hamlib.svn.sourceforge.net
|
||||
|
||||
N.B. The libtool package is in a state of flux where we need to support the
|
||||
older 1.5 version and the newer 2.2.x version. As luck would have it, they
|
||||
are incompatible with their Autotools syntax. A test is in place in the
|
||||
`autogen.sh' script for `libtool' version 1.x. Please advise on the
|
||||
hamlib-developer mailing list you have an older version of libtool and are
|
||||
receiving errors.
|
||||
|
||||
Optional:
|
||||
* GNU C++ # g++ --version
|
||||
* swig (for bindings) 1.3.14 # swig -version
|
||||
|
@ -192,19 +200,27 @@ It is important to note that the SVN repository holds no autogenerated
|
|||
files, i.e. configure, config.guess, Makefile, etc. Hence after a fresh
|
||||
checkout, you'll have to generate those files.
|
||||
|
||||
NOTE: The following paragraph and running the autofixer.sh script may not be
|
||||
needed. Please try running the `autogen.sh' script first and please report any
|
||||
errors to the hamlib-developer mailing list.
|
||||
|
||||
-----
|
||||
The provided autogen.sh and configure.ac files are appropriate for systems with
|
||||
libtool version 2. Many systems may still provide libtool version 1, however.
|
||||
To set up for version 1 of libtool, you may run the procedure autofixer.sh
|
||||
before running autogen.sh, as described below. I.e., give the following
|
||||
command.
|
||||
libtool version 2.2.x Many systems may still provide libtool version 1.x,
|
||||
however. To set up for version 1.x of libtool, you may run the `autofixer.sh'
|
||||
script before running `autogen.sh', as described below. i.e., give the
|
||||
following command in the hamlib root directory.
|
||||
|
||||
cd hamlib
|
||||
sh ./autofixer.sh
|
||||
-----
|
||||
|
||||
To proceed, first edit the autogen.sh, and set appropriately the AUTOCONF,
|
||||
AUTOHEADER, AUTOHEADER, and ACLOCAL variables with the required versions
|
||||
seen in the previous section (most systems will be fine with the default
|
||||
names).
|
||||
To proceed, first edit the autogen.sh script, and set appropriately the
|
||||
AUTOCONF, AUTOHEADER, AUTOHEADER, and ACLOCAL variables with the required
|
||||
versions seen in the previous section (most systems will be fine with the
|
||||
default names).
|
||||
|
||||
cd hamlib
|
||||
sh ./autogen.sh --disable-static --prefix=/usr/local CFLAGS="-g -O0"
|
||||
make
|
||||
make install
|
||||
|
@ -220,27 +236,30 @@ following in the same parent directory of hamlib:
|
|||
This will keep the binary output files seperate from the source tree and aid
|
||||
in development by reducing clutter in the source tree.
|
||||
|
||||
Once you've run autogen.sh, make sure you've got some recent config.guess and
|
||||
Once you've run `autogen.sh', make sure you've got some recent config.guess and
|
||||
config.sub (needed to guess your system type). Anything of at least year 2004
|
||||
should be fine, unless you run some exotic hardware/software system:
|
||||
|
||||
./config.guess --version
|
||||
./config.sub --version
|
||||
|
||||
The prefix argument is optional. Convention is that local packages be placed
|
||||
in /usr/local away from distribution installed packages. The --disable-static
|
||||
and CFLAGS="-g -O0" speeds up compilation if you don't plan to use static
|
||||
libraries and can bear less optimized binaries while the -g option adds
|
||||
debugging info which can be changed to -ggdb to generate debugging info for
|
||||
gdb.
|
||||
The '--prefix' option to `autogen.sh' is optional. Convention is that locally
|
||||
built packages be installed in /usr/local away from distribution installed
|
||||
packages. The '--disable-static' and 'CFLAGS="-g -O0"' speeds up compilation
|
||||
if you don't plan to use static libraries and can bear less optimized binaries
|
||||
while the '-g' option adds debugging info which can be changed to -ggdb to
|
||||
generate debugging info for gdb. Additionally, you may want to add the
|
||||
'--without-perl-binding' and '--without-python-binding' if you are not
|
||||
interested in those scripting languages.
|
||||
|
||||
NOTE: autogen.sh has only to be run the first time after a fresh checkout or
|
||||
when a Makefile.am or other build file is modified or added.
|
||||
NOTE: The autogen.sh script has only to be run the first time after a fresh
|
||||
checkout or when a Makefile.am or other build file is modified or added.
|
||||
|
||||
The difference between building as a tester and a developer is in the
|
||||
'--enable-maintainer-mode' option passed to configure. This option will add
|
||||
The difference between building as a beta tester and a developer is in the
|
||||
'--enable-maintainer-mode' option passed to configure from . This option will add
|
||||
new Makefile targets and dependencies and not force a rebuild of the Makefiles
|
||||
when make is executed.
|
||||
when make is executed. This is why we recommend that beta testers use the
|
||||
daily SVN snapshot from http://n0nb.users.sourceforge.net
|
||||
|
||||
For a Tcl build, add this if needed:
|
||||
|
||||
|
|
74
src/misc.c
74
src/misc.c
|
@ -2,7 +2,7 @@
|
|||
* Hamlib Interface - toolbox
|
||||
* Copyright (c) 2000-2005 by Stephane Fillod
|
||||
*
|
||||
* $Id: misc.c,v 1.51 2009-01-11 17:36:24 mrtembry Exp $
|
||||
* $Id$
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
|
@ -273,10 +273,10 @@ static struct {
|
|||
{ RIG_MODE_ECSSUSB, "ECSSUSB" },
|
||||
{ RIG_MODE_ECSSLSB, "ECSSLSB" },
|
||||
{ RIG_MODE_FAX, "FAX" },
|
||||
{ RIG_MODE_SAM, "SAM" },
|
||||
{ RIG_MODE_SAL, "SAL" },
|
||||
{ RIG_MODE_SAH, "SAH" },
|
||||
{ RIG_MODE_DSB, "DSB"},
|
||||
{ RIG_MODE_SAM, "SAM" },
|
||||
{ RIG_MODE_SAL, "SAL" },
|
||||
{ RIG_MODE_SAH, "SAH" },
|
||||
{ RIG_MODE_DSB, "DSB"},
|
||||
{ RIG_MODE_NONE, "" },
|
||||
};
|
||||
|
||||
|
@ -319,20 +319,20 @@ const char * HAMLIB_API rig_strrmode(rmode_t mode)
|
|||
}
|
||||
|
||||
static struct {
|
||||
vfo_t vfo;
|
||||
const char *str;
|
||||
vfo_t vfo;
|
||||
const char *str;
|
||||
} vfo_str[] = {
|
||||
{ RIG_VFO_A, "VFOA" },
|
||||
{ RIG_VFO_B, "VFOB" },
|
||||
{ RIG_VFO_C, "VFOC" },
|
||||
{ RIG_VFO_CURR, "currVFO" },
|
||||
{ RIG_VFO_MEM, "MEM" },
|
||||
{ RIG_VFO_VFO, "VFO" },
|
||||
{ RIG_VFO_TX, "TX" },
|
||||
{ RIG_VFO_RX, "RX" },
|
||||
{ RIG_VFO_MAIN, "Main" },
|
||||
{ RIG_VFO_SUB, "Sub" },
|
||||
{ RIG_VFO_NONE, "" },
|
||||
{ RIG_VFO_A, "VFOA" },
|
||||
{ RIG_VFO_B, "VFOB" },
|
||||
{ RIG_VFO_C, "VFOC" },
|
||||
{ RIG_VFO_CURR, "currVFO" },
|
||||
{ RIG_VFO_MEM, "MEM" },
|
||||
{ RIG_VFO_VFO, "VFO" },
|
||||
{ RIG_VFO_TX, "TX" },
|
||||
{ RIG_VFO_RX, "RX" },
|
||||
{ RIG_VFO_MAIN, "Main" },
|
||||
{ RIG_VFO_SUB, "Sub" },
|
||||
{ RIG_VFO_NONE, "" },
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -374,8 +374,8 @@ const char * HAMLIB_API rig_strvfo(vfo_t vfo)
|
|||
}
|
||||
|
||||
static struct {
|
||||
setting_t func;
|
||||
const char *str;
|
||||
setting_t func;
|
||||
const char *str;
|
||||
} func_str[] = {
|
||||
{ RIG_FUNC_FAGC, "FAGC" },
|
||||
{ RIG_FUNC_NB, "NB" },
|
||||
|
@ -387,8 +387,8 @@ static struct {
|
|||
{ RIG_FUNC_FBKIN, "FBKIN" },
|
||||
{ RIG_FUNC_ANF, "ANF" },
|
||||
{ RIG_FUNC_NR, "NR" },
|
||||
{ RIG_FUNC_AIP, "AIP" },
|
||||
{ RIG_FUNC_APF, "APF" },
|
||||
{ RIG_FUNC_AIP, "AIP" },
|
||||
{ RIG_FUNC_APF, "APF" },
|
||||
{ RIG_FUNC_MON, "MON" },
|
||||
{ RIG_FUNC_MN, "MN" },
|
||||
{ RIG_FUNC_RF, "RF" },
|
||||
|
@ -397,8 +397,8 @@ static struct {
|
|||
{ RIG_FUNC_MUTE, "MUTE" },
|
||||
{ RIG_FUNC_VSC, "VSC" },
|
||||
{ RIG_FUNC_REV, "REV" },
|
||||
{ RIG_FUNC_SQL, "SQL" },
|
||||
{ RIG_FUNC_ABM, "ABM" },
|
||||
{ RIG_FUNC_SQL, "SQL" },
|
||||
{ RIG_FUNC_ABM, "ABM" },
|
||||
{ RIG_FUNC_BC, "BC" },
|
||||
{ RIG_FUNC_MBC, "MBC" },
|
||||
{ RIG_FUNC_AFC, "AFC" },
|
||||
|
@ -450,8 +450,8 @@ const char * HAMLIB_API rig_strfunc(setting_t func)
|
|||
}
|
||||
|
||||
static struct {
|
||||
setting_t level;
|
||||
const char *str;
|
||||
setting_t level;
|
||||
const char *str;
|
||||
} level_str[] = {
|
||||
{ RIG_LEVEL_PREAMP, "PREAMP" },
|
||||
{ RIG_LEVEL_ATT, "ATT" },
|
||||
|
@ -478,7 +478,7 @@ static struct {
|
|||
{ RIG_LEVEL_ANTIVOX, "ANTIVOX" },
|
||||
{ RIG_LEVEL_SLOPE_LOW, "SLOPE_LOW" },
|
||||
{ RIG_LEVEL_SLOPE_HIGH, "SLOPE_HIGH" },
|
||||
{ RIG_LEVEL_BKIN_DLYMS, "BKIN_DLYMS" },
|
||||
{ RIG_LEVEL_BKIN_DLYMS, "BKIN_DLYMS" },
|
||||
{ RIG_LEVEL_RAWSTR, "RAWSTR" },
|
||||
{ RIG_LEVEL_SQLSTAT, "SQLSTAT" },
|
||||
{ RIG_LEVEL_SWR, "SWR" },
|
||||
|
@ -527,16 +527,16 @@ const char * HAMLIB_API rig_strlevel(setting_t level)
|
|||
}
|
||||
|
||||
static struct {
|
||||
setting_t parm;
|
||||
const char *str;
|
||||
setting_t parm;
|
||||
const char *str;
|
||||
} parm_str[] = {
|
||||
{ RIG_PARM_ANN, "ANN" },
|
||||
{ RIG_PARM_APO, "APO" },
|
||||
{ RIG_PARM_BACKLIGHT, "BACKLIGHT" },
|
||||
{ RIG_PARM_BEEP, "BEEP" },
|
||||
{ RIG_PARM_TIME, "TIME" },
|
||||
{ RIG_PARM_BAT, "BAT" },
|
||||
{ RIG_PARM_KEYLIGHT, "KEYLIGHT"},
|
||||
{ RIG_PARM_BAT, "BAT" },
|
||||
{ RIG_PARM_KEYLIGHT, "KEYLIGHT"},
|
||||
{ RIG_PARM_NONE, "" },
|
||||
};
|
||||
|
||||
|
@ -580,8 +580,8 @@ const char * HAMLIB_API rig_strparm(setting_t parm)
|
|||
}
|
||||
|
||||
static struct {
|
||||
vfo_op_t vfo_op;
|
||||
const char *str;
|
||||
vfo_op_t vfo_op;
|
||||
const char *str;
|
||||
} vfo_op_str[] = {
|
||||
{ RIG_OP_CPY, "CPY" },
|
||||
{ RIG_OP_XCHG, "XCHG" },
|
||||
|
@ -639,8 +639,8 @@ const char * HAMLIB_API rig_strvfop(vfo_op_t op)
|
|||
}
|
||||
|
||||
static struct {
|
||||
scan_t rscan;
|
||||
const char *str;
|
||||
scan_t rscan;
|
||||
const char *str;
|
||||
} scan_str[] = {
|
||||
{ RIG_SCAN_STOP, "STOP" },
|
||||
{ RIG_SCAN_MEM, "MEM" },
|
||||
|
@ -723,8 +723,8 @@ rptr_shift_t HAMLIB_API rig_parse_rptr_shift(const char *s)
|
|||
}
|
||||
|
||||
static struct {
|
||||
chan_type_t mtype;
|
||||
const char *str;
|
||||
chan_type_t mtype;
|
||||
const char *str;
|
||||
} mtype_str[] = {
|
||||
{ RIG_MTYPE_MEM, "MEM" },
|
||||
{ RIG_MTYPE_EDGE, "EDGE" },
|
||||
|
|
Ładowanie…
Reference in New Issue