Check if the compiler supports C99 and better check for some math functions.
Add a configuration check that says we would like to use C99 if the compiler supports it. Also change the lround(), nan(), fmin() and fmax() checks to look in the default libraries as well as the math library. Update the iverilog-vpi sh script to correctly quote CC since it may now have two words (gcc -std=gnu99). Add a missing int for main in draw_tt.c.
This commit is contained in:
parent
d64b1f0275
commit
ed7e9f8be5
11
configure.in
11
configure.in
|
|
@ -11,6 +11,7 @@ AC_CONFIG_HEADER(tgt-vhdl/vhdl_config.h)
|
|||
AC_CANONICAL_HOST
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
AC_CHECK_TOOL(STRIP, strip, true)
|
||||
|
|
@ -156,7 +157,15 @@ AC_SUBST(file64_support)
|
|||
|
||||
# Check that these functions exist. They are mostly C99
|
||||
# functions that older compilers may not yet support.
|
||||
AC_CHECK_FUNCS(lround nan fmin fmax fopen64)
|
||||
AC_CHECK_FUNCS(fopen64)
|
||||
# The following math functions may be defined in the math library so look
|
||||
# in the default libraries first and then look in -lm for them. On some
|
||||
# systems we may need to use the compiler in C99 mode to get a definition.
|
||||
# We requested C99 mode earlier with AC_PROG_CC_C99.
|
||||
AC_SEARCH_LIBS([lround], [m], [AC_DEFINE([HAVE_LROUND], [1])])
|
||||
AC_SEARCH_LIBS([nan], [m], [AC_DEFINE([HAVE_NAN], [1])])
|
||||
AC_SEARCH_LIBS([fmin], [m], [AC_DEFINE([HAVE_FMIN], [1])])
|
||||
AC_SEARCH_LIBS([fmax], [m], [AC_DEFINE([HAVE_FMAX], [1])])
|
||||
|
||||
# Linker option used when compiling the target
|
||||
AX_LD_RDYNAMIC
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
|
||||
# These are the variables used for compiling files
|
||||
CC=@IVCC@
|
||||
CC="@IVCC@"
|
||||
CXX=@IVCXX@
|
||||
CFLAGS="@PIC@ @IVCFLAGS@ -I@INCLUDEDIR@"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2009 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -117,7 +117,7 @@ static void draw_oct_table()
|
|||
printf("};\n");
|
||||
}
|
||||
|
||||
main()
|
||||
int main()
|
||||
{
|
||||
draw_hex_table();
|
||||
draw_oct_table();
|
||||
|
|
|
|||
Loading…
Reference in New Issue