From 0c7966fc30a714b19a48aa162826ad582279e47f Mon Sep 17 00:00:00 2001 From: Kamal Mostafa Date: Sun, 20 Mar 2011 11:42:14 -0700 Subject: [PATCH] Fix mingw32 cross-compilation procedure and config Updated README.release procedure and configure.ac for Windows DLL (mingw32) build. Now that hamlib no longer bundles libltdl (libtool), libltdl must be imported, configured with --host-i586-mingw32msvc, and built (before configuring hamlib with --host-i586-mingw32msvc). --- README.release | 9 +++++++-- configure.ac | 11 +++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/README.release b/README.release index f145eff01..2e20e2b47 100644 --- a/README.release +++ b/README.release @@ -16,7 +16,7 @@ Before deciding release: * Announce SVN/version freeze on hamlib-developer mailing list, so developers have time to check in their contributions. -* Update libtool: +* Update the configuration: clean the tree sh ./autogen.sh @@ -48,12 +48,17 @@ Releasing Hamlib: * Build Windows DLL from previous tarball, and .LIB, then create .zip file Rem: under Linux, you need the package mingw32 to cross-compile it, + and an internal copy of libltdl (configured and built), and free MVC++Toolkit to create .lib file: + # Import internal ./libltdl and build it for mingw32 + libtoolize --ltdl + ( cd libltdl; ./configure --host=i586-mingw32msvc && make ) + # Configure and build hamlib for mingw32 ./configure --disable-static \ --host=i586-mingw32msvc \ --prefix=/tmp/mingw-inst \ --without-rpc-backends \ - --enable-xmltest PKG_CONFIG_LIBDIR= ac_cv_path_PKG_CONFIG=no + PKG_CONFIG_LIBDIR= ac_cv_path_PKG_CONFIG=no make install new_ver="x.y.z" mkdir -p /tmp/mingw-inst/hamlib-${new_ver}/lib/msvc /tmp/mingw-inst/hamlib-${new_ver}/lib/gcc diff --git a/configure.ac b/configure.ac index 9e5a34e6c..d54a74bb7 100644 --- a/configure.ac +++ b/configure.ac @@ -200,6 +200,17 @@ darwin* | rhapsody*) mingw* | pw32* | cygwin*) WINLDFLAGS="-Wl,--output-def,libhamlib.def -Wl,--add-stdcall-alias" AC_SUBST([WINLDFLAGS]) + # Prerequisite for Mingw build (import and build internal ./libltdl): + # $ libtoolize --ltdl + # $ ( cd libltdl; ./configure --host=i586-mingw32msvc && make ) + # Use internal ./libltdl during configure: + CFLAGS="${CFLAGS} -I./libltdl" + # use internal $(top_builddir)/libltdl during build: + INCLTDL="-I\$(top_builddir)/libltdl" + # - use internal $(top_builddir)/libltdl during build and library 'ltdlc': + LIBLTDL="-L\$(top_builddir)/libltdl -lltdlc" + AC_SUBST(INCLTDL) + AC_SUBST(LIBLTDL) ;; esac