kopia lustrzana https://github.com/Hamlib/Hamlib
Disable static builds by default
Static libs are generally not wanted so disable their builds by default. Remove references to '--disable-static' from documentation and example scripts.Hamlib-3.0
rodzic
728128b55a
commit
95ec564af2
12
INSTALL
12
INSTALL
|
@ -29,15 +29,6 @@ main directory and do the following:
|
||||||
The configure script has several options to configure Hamlib. See the
|
The configure script has several options to configure Hamlib. See the
|
||||||
Optional Features section below.
|
Optional Features section below.
|
||||||
|
|
||||||
N.B. If you know that you won't need static libaries (most applications
|
|
||||||
dynamically link Hamlib by default) invoke `configure' as follows:
|
|
||||||
|
|
||||||
$ ./configure --disable-static
|
|
||||||
|
|
||||||
This will result in a much smaller Hamlib installation (and faster
|
|
||||||
compilation :-) ). See also the "Hamlib specific Features" section
|
|
||||||
below for other `configure' options.
|
|
||||||
|
|
||||||
While running, `configure' prints some messages telling you which
|
While running, `configure' prints some messages telling you which
|
||||||
features it is checking for.
|
features it is checking for.
|
||||||
|
|
||||||
|
@ -288,6 +279,3 @@ will quit before compilation is complete) if the
|
||||||
--with-[perl|python|tcl]-binding option(s) are given and the Swig package is
|
--with-[perl|python|tcl]-binding option(s) are given and the Swig package is
|
||||||
not installed.
|
not installed.
|
||||||
|
|
||||||
Building static libraries can be disabled by use of the `--disable-static'
|
|
||||||
option. This will reduce the installed size of Hamlib considerably.
|
|
||||||
|
|
||||||
|
|
|
@ -102,19 +102,18 @@ Git master branch daily snapshot build:
|
||||||
Reading the INSTALL file in top directory will explain in more detail how
|
Reading the INSTALL file in top directory will explain in more detail how
|
||||||
to do the following commands.
|
to do the following commands.
|
||||||
|
|
||||||
./configure [--disable-static] [--prefix=</usr/local>]
|
./configure [--prefix=$HOME/local]
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
The prefix argument is optional. Convention is that local packages be
|
The prefix argument is optional. Convention is that local packages be
|
||||||
placed in /usr/local away from distribution installed packages This is the
|
placed in /usr/local away from distribution installed packages This is the
|
||||||
default location for the snapshots so it may be disregarded unless you wish
|
default location for the snapshots so it may be disregarded unless you wish
|
||||||
to install Hamlib elsewhere. The '--disable-static' option speeds up
|
to install Hamlib elsewhere. The example above would install Hamlib to
|
||||||
compilation if you don't plan to use static libraries (static libraries are
|
the user's home directory under the 'local' subdirectory.
|
||||||
usually not needed).
|
|
||||||
|
|
||||||
Other useful options are '--with-perl-binding' or '--with-python-binding' or
|
Other useful options are '--with-perl-binding' or '--with-python-binding' or
|
||||||
'--enable-tcl-binding' if you are interested in Swig binding support for
|
'--with-tcl-binding' if you are interested in Swig binding support for
|
||||||
those scripting languages If you are unsure it is safe to ignore these
|
those scripting languages If you are unsure it is safe to ignore these
|
||||||
options.
|
options.
|
||||||
|
|
||||||
|
|
|
@ -277,12 +277,12 @@ files, i.e. configure, config.guess, Makefile, etc. Hence after a fresh
|
||||||
checkout, you'll have to generate those files.
|
checkout, you'll have to generate those files.
|
||||||
|
|
||||||
To proceed, first edit the autogen.sh script, and set appropriately the
|
To proceed, first edit the autogen.sh script, and set appropriately the
|
||||||
AUTOCONF, AUTOMAKE, and LIBTOOLIZE variables with the required versions seen
|
AUTORECONF, AUTOMAKE, and LIBTOOLIZE variables with the required versions seen
|
||||||
in the previous section (most systems will be fine with the default names,
|
in the previous section (most systems will be fine with the default names,
|
||||||
only do this if a problem arises and please let us know).
|
only do this if a problem arises and please let us know).
|
||||||
|
|
||||||
cd hamlib
|
cd hamlib
|
||||||
sh ./autogen.sh [--disable-static] [CFLAGS="-g -O0"]
|
sh ./autogen.sh [CFLAGS="-g -O0"]
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
@ -290,10 +290,13 @@ If you don't want the build files cluttering the source directories, do the
|
||||||
following in the same parent directory of hamlib:
|
following in the same parent directory of hamlib:
|
||||||
|
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
sh ../hamlib/autogen.sh [--disable-static] [CFLAGS="-g -O0"]
|
sh ../hamlib/autogen.sh [CFLAGS="-g -O0"]
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
Note: In the examples above, passing the CFLAGS environment variable is
|
||||||
|
optional.
|
||||||
|
|
||||||
This will keep the binary output files seperate from the source tree and aid
|
This will keep the binary output files seperate from the source tree and aid
|
||||||
in development by reducing clutter in the source tree.
|
in development by reducing clutter in the source tree.
|
||||||
|
|
||||||
|
@ -304,16 +307,15 @@ year 2004 should be fine, unless you run some exotic hardware/software system:
|
||||||
./config.guess --version
|
./config.guess --version
|
||||||
./config.sub --version
|
./config.sub --version
|
||||||
|
|
||||||
The '--prefix' option to `autogen.sh' is optional and not shown as it
|
The '--prefix' option to `autogen.sh' is optional and not shown as it defaults
|
||||||
defaults to /usr/local. Convention is that locally built packages be
|
to /usr/local. Convention is that locally built packages be installed in
|
||||||
installed in /usr/local away from distribution installed packages. The
|
/usr/local away from distribution installed packages. The 'CFLAGS="-g -O0"'
|
||||||
'--disable-static' and 'CFLAGS="-g -O0"' speeds up compilation if you don't
|
environment variable generates less optimized binaries with the '-O0' while the
|
||||||
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
|
'-g' option adds debugging info which can be changed to -ggdb to generate
|
||||||
debugging info for gdb.
|
debugging info for gdb.
|
||||||
|
|
||||||
Additionally, you may want to add the '--with-perl-binding' or
|
Additionally, you may want to add the '--with-perl-binding' or
|
||||||
'--with-python-binding' or '--enable-tcl-binding' if you are interested in
|
'--with-python-binding' or '--with-tcl-binding' if you are interested in
|
||||||
Swig binding support for those scripting languages.
|
Swig binding support for those scripting languages.
|
||||||
|
|
||||||
NOTE: The autogen.sh script has only to be run the first time after a fresh
|
NOTE: The autogen.sh script has only to be run the first time after a fresh
|
||||||
|
|
11
README.win32
11
README.win32
|
@ -26,12 +26,13 @@ linking with Windows apps:
|
||||||
1. To create the dlls, do the following from within Cygwin (assumes
|
1. To create the dlls, do the following from within Cygwin (assumes
|
||||||
Cygwin is fully updated):
|
Cygwin is fully updated):
|
||||||
|
|
||||||
# export CC="gcc -mno-cygwin"
|
$ export CC="gcc -mno-cygwin"
|
||||||
# export CXX="g++ -mno-cygwin"
|
$ export CXX="g++ -mno-cygwin"
|
||||||
# ./autogen.sh --prefix=/usr/local --disable-static \
|
$ ./autogen.sh --prefix=/usr/local \
|
||||||
--without-tcl-binding --without-perl-binding \
|
--build=i686-pc-cygwin \
|
||||||
--without-python-binding --build=i686-pc-cygwin --host=i686-pc-mingw32 \
|
--host=i686-pc-mingw32 \
|
||||||
--target=i686-pc-mingw32
|
--target=i686-pc-mingw32
|
||||||
|
|
||||||
Note: on subsequent runs you can replace ./autogen.sh with ./configure
|
Note: on subsequent runs you can replace ./autogen.sh with ./configure
|
||||||
unless there are modifications to any .ac, .m4, or Makefile.am file.
|
unless there are modifications to any .ac, .m4, or Makefile.am file.
|
||||||
In that case, "make clean", and re-run autogen as above.
|
In that case, "make clean", and re-run autogen as above.
|
||||||
|
|
43
configure.ac
43
configure.ac
|
@ -268,33 +268,29 @@ AC_LIBOBJ([dummy])
|
||||||
## ------------------------ ##
|
## ------------------------ ##
|
||||||
## libtool Initialisation. ##
|
## libtool Initialisation. ##
|
||||||
## ------------------------ ##
|
## ------------------------ ##
|
||||||
## N.b. LT_INIT([dlopen], [win32-dll]) does not work for older libtool
|
|
||||||
LT_PREREQ([2.2.6b])
|
LT_PREREQ([2.2.6b])
|
||||||
|
|
||||||
# Name the subdirectory that contains libltdl sources
|
dnl Name the subdirectory that contains libltdl sources
|
||||||
LT_CONFIG_LTDL_DIR([libltdl])
|
LT_CONFIG_LTDL_DIR([libltdl])
|
||||||
|
|
||||||
# Name the subdirectory that contains libltdl sources
|
dnl N.B. LT_INIT([dlopen], [win32-dll]) does not work for older libtool
|
||||||
LT_INIT([dlopen win32-dll])
|
dnl so require new enough version above. Disable static library builds as
|
||||||
|
dnl the frontend and backend libs are not linked. May need a recipe outside
|
||||||
|
dnl of Libtool if these are needed.
|
||||||
|
LT_INIT([dlopen win32-dll disable-static])
|
||||||
|
|
||||||
# Enable building of the convenience libltdl library
|
dnl Enable building of the convenience libltdl library
|
||||||
# (requires --with-included-ltdl be given to configure for the included
|
dnl (requires --with-included-ltdl be given to configure for the included
|
||||||
# libltdl to be used), useful on systems where libltdl-dev is not installed.
|
dnl libltdl to be used instead of an installed version), useful on systems
|
||||||
|
dnl where libltdl-dev is not installed.
|
||||||
LTDL_INIT([convenience])
|
LTDL_INIT([convenience])
|
||||||
|
|
||||||
dnl AC_LIBTOOL_DLOPEN
|
|
||||||
dnl AC_LIBTOOL_WIN32_DLL
|
|
||||||
dnl AC_PROG_LIBTOOL
|
|
||||||
dnl AM_PROG_LIBTOOL
|
|
||||||
dnl INCLTDL=""
|
|
||||||
dnl LIBLTDL="-lltdl"
|
|
||||||
dnl AC_SUBST([INCLTDL])
|
|
||||||
dnl AC_SUBST([LIBLTDL])
|
|
||||||
|
|
||||||
|
|
||||||
## -------------------------- ##
|
## -------------------------- ##
|
||||||
## Custom host configurations ##
|
## Custom host configurations ##
|
||||||
## -------------------------- ##
|
## -------------------------- ##
|
||||||
|
|
||||||
AS_CASE(["$host_os"],
|
AS_CASE(["$host_os"],
|
||||||
[freebsd*], [
|
[freebsd*], [
|
||||||
AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}"
|
AM_CPPFLAGS="-I/usr/local/include ${AM_CPPFLAGS}"
|
||||||
|
@ -317,25 +313,12 @@ AS_CASE(["$host_os"],
|
||||||
WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias"
|
WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias"
|
||||||
AC_SUBST([WINLDFLAGS])
|
AC_SUBST([WINLDFLAGS])
|
||||||
|
|
||||||
dnl # Prerequisite for Mingw build (import and build internal ./libltdl):
|
|
||||||
dnl # $ libtoolize --ltdl
|
|
||||||
dnl # $ ( cd libltdl; ./configure --host=i586-mingw32msvc && make )
|
|
||||||
dnl # Use internal ./libltdl during configure:
|
|
||||||
dnl CFLAGS="${CFLAGS} -I./libltdl"
|
|
||||||
|
|
||||||
dnl # use internal $(top_builddir)/libltdl during build:
|
|
||||||
dnl INCLTDL="-I\$(top_builddir)/libltdl"
|
|
||||||
dnl AC_SUBST([INCLTDL])
|
|
||||||
|
|
||||||
dnl # - use internal $(top_builddir)/libltdl during build and library 'ltdlc':
|
|
||||||
dnl LIBLTDL="-L\$(top_builddir)/libltdl -lltdlc"
|
|
||||||
dnl AC_SUBST([LIBLTDL])
|
|
||||||
|
|
||||||
# Enable ld's "auto import" for executables
|
# Enable ld's "auto import" for executables
|
||||||
WINEXELDFLAGS="-Wl,--enable-auto-import"
|
WINEXELDFLAGS="-Wl,--enable-auto-import"
|
||||||
AC_SUBST([WINEXELDFLAGS])
|
AC_SUBST([WINEXELDFLAGS])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
## ---------------------- ##
|
## ---------------------- ##
|
||||||
## External package tests ##
|
## External package tests ##
|
||||||
## ---------------------- ##
|
## ---------------------- ##
|
||||||
|
|
|
@ -175,17 +175,12 @@ mv include/hamlib/rig_dll.h include/hamlib/rig_dll.h.orig
|
||||||
sed -e 's/__cdecl/__stdcall/' <include/hamlib/rig_dll.h.orig >include/hamlib/rig_dll.h
|
sed -e 's/__cdecl/__stdcall/' <include/hamlib/rig_dll.h.orig >include/hamlib/rig_dll.h
|
||||||
rm include/hamlib/rig_dll.h.orig
|
rm include/hamlib/rig_dll.h.orig
|
||||||
|
|
||||||
# Import internal ./libltdl and build it for mingw32
|
|
||||||
libtoolize --ltdl
|
|
||||||
cd libltdl; ./configure --host=i586-mingw32msvc && make; cd ..
|
|
||||||
|
|
||||||
# Configure and build hamlib for mingw32, with libusb-win32
|
# Configure and build hamlib for mingw32, with libusb-win32
|
||||||
|
|
||||||
./configure --disable-static \
|
./configure --host=i586-mingw32msvc \
|
||||||
--host=i586-mingw32msvc \
|
|
||||||
--prefix=`pwd`/mingw-inst \
|
--prefix=`pwd`/mingw-inst \
|
||||||
--without-rpc-backends \
|
|
||||||
--without-cxx-binding \
|
--without-cxx-binding \
|
||||||
|
--with-included-ltdl \
|
||||||
PKG_CONFIG_LIBDIR=${LIBUSB_WIN32_BIN_PATH}/lib/pkgconfig
|
PKG_CONFIG_LIBDIR=${LIBUSB_WIN32_BIN_PATH}/lib/pkgconfig
|
||||||
|
|
||||||
make install
|
make install
|
||||||
|
@ -201,7 +196,6 @@ for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester
|
||||||
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done
|
cp -a ${f} ${ZIP_DIR}/${f}.txt ; todos ${ZIP_DIR}/${f}.txt ; done
|
||||||
|
|
||||||
# Copy build files into specific locations for Zip file
|
# Copy build files into specific locations for Zip file
|
||||||
cp -a ${INST_DIR}/bin/{rigctld.exe,rigctl.exe,rigmem.exe,rigsmtr.exe,rigswr.exe,rotctld.exe,rotctl.exe} ${ZIP_DIR}/bin/.
|
|
||||||
cp -a ${INST_DIR}/lib/hamlib/hamlib-*.dll ${ZIP_DIR}/bin/.
|
cp -a ${INST_DIR}/lib/hamlib/hamlib-*.dll ${ZIP_DIR}/bin/.
|
||||||
cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/.
|
cp -a ${INST_DIR}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/.
|
||||||
cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
|
cp -a ${INST_DIR}/lib/libhamlib.dll.a ${ZIP_DIR}/lib/gcc/.
|
||||||
|
@ -213,3 +207,4 @@ cp -a ${LIBUSB_WIN32_BIN_PATH}/bin/x86/libusb0_x86.dll ${ZIP_DIR}/bin/libusb0.dl
|
||||||
# Need VC++ free toolkit installed (default Wine directory installation shown)
|
# Need VC++ free toolkit installed (default Wine directory installation shown)
|
||||||
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
|
( cd ${ZIP_DIR}/lib/msvc/ && wine ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003/bin/link.exe /lib /machine:i386 /def:libhamlib-2.def )
|
||||||
zip -r hamlib-VB.NET-${RELEASE}.zip `basename ${ZIP_DIR}`
|
zip -r hamlib-VB.NET-${RELEASE}.zip `basename ${ZIP_DIR}`
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,7 @@ END_OF_README
|
||||||
|
|
||||||
# Configure and build hamlib for mingw32, with libusb-win32
|
# Configure and build hamlib for mingw32, with libusb-win32
|
||||||
|
|
||||||
./configure --disable-static \
|
./configure --host=i586-mingw32msvc \
|
||||||
--host=i586-mingw32msvc \
|
|
||||||
--prefix=`pwd`/mingw-inst \
|
--prefix=`pwd`/mingw-inst \
|
||||||
--without-cxx-binding \
|
--without-cxx-binding \
|
||||||
--with-included-ltdl \
|
--with-included-ltdl \
|
||||||
|
|
Ładowanie…
Reference in New Issue