diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-06-09 19:07:13 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2005-06-09 19:07:13 +0000 |
commit | 1827ed6ffed399c7c26586698544eb5fb58c489f (patch) | |
tree | aaff0452241706e643d8d208883dd3d17445baab | |
parent | f9a3736e50867d9be714e470597078bcb86f3669 (diff) |
more support for mingw (just give the "host" at configure-time)
svn path=/trunk/externals/iem/iemmatrix/; revision=3151
-rw-r--r-- | INSTALL.txt | 9 | ||||
-rw-r--r-- | src/configure.ac | 55 |
2 files changed, 55 insertions, 9 deletions
diff --git a/INSTALL.txt b/INSTALL.txt index de8f2eb..568389e 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -18,17 +18,10 @@ Installation/Compilation instructions for "iemmatrix" CrossCompilation for w32 with MinGW (http://www.mingw.org) on linux-systems you need a cross-compilation tool-chain for windows (there is a debian-package mingw32) - set the CC-environment-variable to the cross-compiler and export it - set the STRIP-environment-variable to the strip-version that comes with the toolchain and export it - set the CFLAGS-environment-variable to "-mms-bitfields" and export it (this is highly necessary to - run the external if pd was compiled with M$-vc) run "./configure" and specify the path to your "m_pd.h" (with --includedir) and to your "pd.lib" (with --libdir) don't forget to override the default extension ("pd_linux" on linux-systems) with the more appropriate "dll". on bash this looks like: - % export CC=i586-mingw32msvc-cc - % export STRIP=i586-mingw32msvc-strip - % export CFLAGS=-mms-bitfields - % ./configure --includedir=/path/to/w32-pd/src/ -libdir=/path/to/w32-pd/bin/ -with-extension=dll + % ./configure --with-extension=dll --host=i586-mingw32msvc --includedir=/path/to/w32-pd/src/ -libdir=/path/to/w32-pd/bin/ now run "make" and enjoy. diff --git a/src/configure.ac b/src/configure.ac index 45fb377..97ce924 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -64,9 +64,62 @@ dnl Checks for library functions. AC_FUNC_MMAP AC_CHECK_FUNCS(select socket strerror) +dnl check for "-mms-bitfields" cflag +dnl why is there no generic compiler-check for a given flag ? +dnl it would make things so easy: AC_CHECK_FLAG([-mms-bitfields],,) +AC_MSG_CHECKING("ms-bitfields") +cat > conftest.c << EOF +int main(){ + return 0; +} +EOF +if ${CC} ${INCLUDES} ${DFLAGS} -o conftest.o conftest.c ${CFLAGS} -mms-bitfields > /dev/null 2>&1 +then + echo "yes" + CFLAGS="${CFLAGS} -mms-bitfields" +else + echo "no" +fi + + + +dnl isn't there a better way to check for good linker/stripper ? + +dnl if we don't have $LD set, we set it to $(CC) +dnl LD=${LD:=$CC} +if test "x$LD" = "x" +then + if test "x$host" != "x" + then + LD=${host}-ld + if $(which ${LD} > /dev/null) + then + : + else + LD="" + fi + fi +fi LD=${LD:=$CC} -STRIP=${STRIP:=strip} + +dnl if we don't have $STRIP set, we set it to ${host}-strip or strip +if test "x$STRIP" = "x" +then + if test "x$host" != "x" + then + STRIP=${host}-strip + if $(which ${host}-strip > /dev/null) + then + : + else + STRIP="echo fake strip" + fi + else + STRIP=strip + fi +fi +dnl STRIP=${STRIP:=strip} DFLAGS="" |