diff --git a/INSTALL b/INSTALL index ac8e6f54d..b072ffc5c 100644 --- a/INSTALL +++ b/INSTALL @@ -29,15 +29,6 @@ main directory and do the following: The configure script has several options to configure Hamlib. See the 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 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 not installed. - Building static libraries can be disabled by use of the `--disable-static' -option. This will reduce the installed size of Hamlib considerably. - diff --git a/README.betatester b/README.betatester index 9eb4778d8..5f4a4d926 100644 --- a/README.betatester +++ b/README.betatester @@ -102,19 +102,18 @@ Git master branch daily snapshot build: Reading the INSTALL file in top directory will explain in more detail how to do the following commands. - ./configure [--disable-static] [--prefix=] + ./configure [--prefix=$HOME/local] make make install The prefix argument is optional. Convention is that local packages be 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 -to install Hamlib elsewhere. The '--disable-static' option speeds up -compilation if you don't plan to use static libraries (static libraries are -usually not needed). +to install Hamlib elsewhere. The example above would install Hamlib to +the user's home directory under the 'local' subdirectory. 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 options. diff --git a/README.developer b/README.developer index 638000b83..a082501b8 100644 --- a/README.developer +++ b/README.developer @@ -277,12 +277,12 @@ files, i.e. configure, config.guess, Makefile, etc. Hence after a fresh checkout, you'll have to generate those files. 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, only do this if a problem arises and please let us know). cd hamlib - sh ./autogen.sh [--disable-static] [CFLAGS="-g -O0"] + sh ./autogen.sh [CFLAGS="-g -O0"] make 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: mkdir build && cd build - sh ../hamlib/autogen.sh [--disable-static] [CFLAGS="-g -O0"] + sh ../hamlib/autogen.sh [CFLAGS="-g -O0"] make 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 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.sub --version -The '--prefix' option to `autogen.sh' is optional and not shown as it -defaults to /usr/local. 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 +The '--prefix' option to `autogen.sh' is optional and not shown as it defaults +to /usr/local. Convention is that locally built packages be installed in +/usr/local away from distribution installed packages. The 'CFLAGS="-g -O0"' +environment variable generates less optimized binaries with the '-O0' 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 '--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. NOTE: The autogen.sh script has only to be run the first time after a fresh diff --git a/README.win32 b/README.win32 index 6a1604bd9..b42866776 100644 --- a/README.win32 +++ b/README.win32 @@ -26,12 +26,13 @@ linking with Windows apps: 1. To create the dlls, do the following from within Cygwin (assumes Cygwin is fully updated): -# export CC="gcc -mno-cygwin" -# export CXX="g++ -mno-cygwin" -# ./autogen.sh --prefix=/usr/local --disable-static \ ---without-tcl-binding --without-perl-binding \ ---without-python-binding --build=i686-pc-cygwin --host=i686-pc-mingw32 \ +$ export CC="gcc -mno-cygwin" +$ export CXX="g++ -mno-cygwin" +$ ./autogen.sh --prefix=/usr/local \ +--build=i686-pc-cygwin \ +--host=i686-pc-mingw32 \ --target=i686-pc-mingw32 + Note: on subsequent runs you can replace ./autogen.sh with ./configure unless there are modifications to any .ac, .m4, or Makefile.am file. In that case, "make clean", and re-run autogen as above. diff --git a/configure.ac b/configure.ac index cdb6c398a..90bca691d 100644 --- a/configure.ac +++ b/configure.ac @@ -268,33 +268,29 @@ AC_LIBOBJ([dummy]) ## ------------------------ ## ## libtool Initialisation. ## ## ------------------------ ## -## N.b. LT_INIT([dlopen], [win32-dll]) does not work for older libtool + 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]) -# Name the subdirectory that contains libltdl sources -LT_INIT([dlopen win32-dll]) +dnl N.B. LT_INIT([dlopen], [win32-dll]) does not work for older libtool +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 -# (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 Enable building of the convenience libltdl library +dnl (requires --with-included-ltdl be given to configure for the included +dnl libltdl to be used instead of an installed version), useful on systems +dnl where libltdl-dev is not installed. 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 ## ## -------------------------- ## + AS_CASE(["$host_os"], [freebsd*], [ 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" 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 WINEXELDFLAGS="-Wl,--enable-auto-import" AC_SUBST([WINEXELDFLAGS]) ]) + ## ---------------------- ## ## External package tests ## ## ---------------------- ## diff --git a/scripts/build-VB.NET.sh b/scripts/build-VB.NET.sh index 74e9a2d91..3e5d91516 100644 --- a/scripts/build-VB.NET.sh +++ b/scripts/build-VB.NET.sh @@ -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 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 --disable-static \ - --host=i586-mingw32msvc \ +./configure --host=i586-mingw32msvc \ --prefix=`pwd`/mingw-inst \ - --without-rpc-backends \ --without-cxx-binding \ + --with-included-ltdl \ PKG_CONFIG_LIBDIR=${LIBUSB_WIN32_BIN_PATH}/lib/pkgconfig make install @@ -198,10 +193,9 @@ cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/ rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.VB.NET-bin THANKS ; do \ - 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 -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}/bin/libhamlib-?.dll ${ZIP_DIR}/bin/. 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) ( 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}` + diff --git a/scripts/build-win32.sh b/scripts/build-win32.sh index bb80ca435..6c820fa21 100644 --- a/scripts/build-win32.sh +++ b/scripts/build-win32.sh @@ -170,8 +170,7 @@ END_OF_README # Configure and build hamlib for mingw32, with libusb-win32 -./configure --disable-static \ - --host=i586-mingw32msvc \ +./configure --host=i586-mingw32msvc \ --prefix=`pwd`/mingw-inst \ --without-cxx-binding \ --with-included-ltdl \ @@ -188,7 +187,7 @@ cp -a ${INST_DIR}/include/hamlib ${ZIP_DIR}/include/.; todos ${ZIP_DIR}/include/ rm ${ZIP_DIR}/include/hamlib/{rig,rot}class.h for f in AUTHORS ChangeLog COPYING COPYING.LIB LICENSE README README.betatester README.win32-bin THANKS ; do \ - 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 # Generate PDF documents from nroff formatted man files cd tests