From 1827ed6ffed399c7c26586698544eb5fb58c489f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Thu, 9 Jun 2005 19:07:13 +0000 Subject: more support for mingw (just give the "host" at configure-time) svn path=/trunk/externals/iem/iemmatrix/; revision=3151 --- src/configure.ac | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'src/configure.ac') 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="" -- cgit v1.2.1