[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trouble with MSVC `cl -c -o ...'
From: |
Milan Tichy |
Subject: |
Re: Trouble with MSVC `cl -c -o ...' |
Date: |
Mon, 11 Oct 2004 17:51:38 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 |
Alexandre Duret-Lutz wrote:
Hi,
On Mon, Oct 11, 2004 at 02:20:30PM +0100, Milan Tichy wrote:
I used both AC_PROG_CC_C_O and AM_PROG_CC_C_O but it didn't help.
Could you state your Automake version and post a copy of your configure.ac?
Hi,
Automake version and configure.ac is below...
This is my first attempt to use Autotools. Hence it is very likely there
is something wrong but it works on several Unix systems and in Cygwin
with gcc. Unfortunately I need MSVC as well.
Thanks,
Milan
automake (GNU automake) 1.9.2
configure.ac
----------------------------------------------------
AC_PREREQ(2.59)
AC_INIT([fal], [0.0.1], address@hidden, [fal])
dnl Library versions (current[:revision[:age]])
dnl fal-0.0.1 libfal 0:0:0
FAL_LT_VERSION="0:0:0"
AC_SUBST(FAL_LT_VERSION)
AC_REVISION([$Revision: 1.2 $])
AC_CONFIG_AUX_DIR([config])
AC_SUBST(ac_aux_dir)
AC_CONFIG_SRCDIR([config.h.in])
dnl The following should be replaced with a "real" directory
AC_PREFIX_DEFAULT([$HOME/tmp/fal])
AM_INIT_AUTOMAKE([foreign no-define])
AC_CANONICAL_HOST
AC_LANG(C)
AC_PROG_CC
AC_PROG_CPP
dnl ??? I tried both
dnl AC_PROG_CC_C_O
AM_PROG_CC_C_O
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_LN_S
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_CHECK_LIB(m, sqrt,, [AC_MSG_ERROR([fal requires math library])])
dnl Check for header files
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([math.h]) dnl Just for sure
AC_CHECK_HEADERS([float.h])
AC_TYPE_SIZE_T
AC_CHECK_DECLS([sqrtf],,,[#include <math.h>])
if test "$ac_cv_have_decl_sqrtf" = "yes"; then
AC_CHECK_FUNCS([sqrtf])
fi
AC_CHECK_DECLS([fabsf],,,[#include <math.h>])
if test "$ac_cv_have_decl_fabsf" = "yes"; then
AC_CHECK_FUNCS([fabsf])
fi
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_C_LONG_DOUBLE
AC_C_PROTOTYPES
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
dnl Check for IEEE floating-point support functions
AC_CACHE_CHECK([for IEEE arithmetic control type],
[ac_cv_c_ieee_control], [
case "$host" in
*86-*-linux*)
ac_cv_c_ieee_control=fenv
;;
*-*-cygwin*)
ac_cv_c_ieee_control=cygwin
;;
*-*-mingw*)
ac_cv_c_ieee_control=fenv
;;
*-*-solaris)
ac_cv_c_ieee_control=ieeefp
;;
*-*-hpux11*)
ac_cv_c_ieee_control=fenv
;;
*-*-hpux10*)
ac_cv_c_ieee_control=hpux
;;
*)
ac_cv_c_ieee_control=unknown
;;
esac])
dnl This output variable holds special linker options for Cygwin
CYGWIN_IEEE_CONTROL_LIBS=""
AC_SUBST(CYGWIN_IEEE_CONTROL_LIBS)
dnl Macro checking for ISO C99 IEEE control interface
ac_cv_have_ieee_control_fenv=no
AC_DEFUN([AC_FENV_IEEE_CONTROL], [
AC_CHECK_HEADERS([fenv.h])
AC_CHECK_DECLS([feclearexcept, fetestexcept],,,[#include <fenv.h>])
if test "$ac_cv_have_decl_fetestexcept" = "yes"; then
AC_CHECK_FUNCS([feclearexcept fetestexcept])
if test "$ac_cv_func_fetestexcept" = "yes"; then
ac_cv_have_ieee_control_fenv=yes
AC_DEFINE(HAVE_IEEE_CONTROL_FENV, 1,
[Define to 1 if you have ISO C99 IEEE control interface.])
fi
fi])
dnl Macro checking for BSD-like IEEE control interface
ac_cv_have_ieee_control_ieeefp=no
AC_DEFUN([AC_IEEEFP_IEEE_CONTROL], [
AC_CHECK_HEADERS([ieeefp.h])
AC_CHECK_DECLS([fpsetsticky, fpgetsticky],,,[#include <ieeefp.h>])
if test "$ac_cv_have_decl_fpsetsticky" = "yes"; then
AC_CHECK_FUNCS([fpsetsticky fpgetsticky])
if test "$ac_cv_func_fpsetsticky" = "yes"; then
ac_cv_have_ieee_control_ieeefp=yes
AC_DEFINE(HAVE_IEEE_CONTROL_IEEEFP, 1,
[Define to 1 if you have BSD-like IEEE control interface.])
fi
fi])
dnl Check for actual IEEE arithmetic control
case "$ac_cv_c_ieee_control" in
fenv)
AC_FENV_IEEE_CONTROL
;;
ieeefp)
AC_IEEEFP_IEEE_CONTROL
;;
hpux)
AC_DEFINE(HAVE_IEEE_CONTROL_HPUX, 1,
[Define to 1 if you have HP-UX IEEE control interface.])
;;
cygwin)
if test "$ac_ct_CC" = "cl"; then
AC_CHECK_DECLS([_statusfp],,,[#include <float.h>])
if test "$ac_cv_have_decl__statusfp" = "yes"; then
AC_CHECK_FUNCS([_statusfp])
fi
AC_DEFINE(HAVE_IEEE_CONTROL_MSVC, 1,
[Define to 1 if you have MSCV IEEE control interface.])
dnl Symbolic links do not work with `cl'
dnl Note: Perhaps there exists another way how to change
dnl default behavior just for `cl' compiler
as_ln_s='cp -p'
LN_S=$as_ln_s
AC_SUBST(LN_S)
else
AC_CHECK_FILE([/usr/include/mingw/fenv.h],,
[AC_MSG_ERROR(/usr/include/mingw/fenv.h required)])
AC_CHECK_FILE([/usr/lib/mingw/libmingwex.a],,
[AC_MSG_ERROR(/usr/lib/mingw/libmingwex.a required)])
AC_DEFINE(HAVE_FECLEAREXCEPT, 1)
AC_DEFINE(HAVE_FETESTEXCEPT, 1)
AC_DEFINE(HAVE_IEEE_CONTROL_CYGWIN, 1,
[Define to 1 if you have <fenv.h> and `libmingwex.a' in Cygwin.])
CYGWIN_IEEE_CONTROL_LIBS="-L/usr/lib/mingw -lmingwex"
fi
;;
*)
AC_FENV_IEEE_CONTROL
AC_IEEEFP_IEEE_CONTROL
if test "$ac_cv_have_ieee_control_fenv" = "no" \
&& test "$ac_cv_have_ieee_control_ieeefp" = "no"; then
AC_MSG_ERROR([no IEEE arithmetic interface found])
fi
;;
esac
dnl Output files
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
include/Makefile
main/Makefile
ieee/Makefile
tests/Makefile])
dnl Generate and run `config.status'
AC_OUTPUT
dnl End of file: $RCSfile: configure.ac,v $
----------------------------------------------------
Re: Trouble with MSVC `cl -c -o ...',
Milan Tichy <=