mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Compile in C99 mode
* configure.ac: Require C99 flags. Remove -Wdeclaration-after-statement.
This commit is contained in:
parent
b9cbf3b6de
commit
839dec6325
1 changed files with 16 additions and 17 deletions
33
configure.ac
33
configure.ac
|
@ -65,7 +65,7 @@ AC_CANONICAL_HOST
|
||||||
AC_LIBTOOL_WIN32_DLL
|
AC_LIBTOOL_WIN32_DLL
|
||||||
|
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_PROG_CC
|
AC_PROG_CC_C99
|
||||||
gl_EARLY
|
gl_EARLY
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
AC_PROG_SED
|
AC_PROG_SED
|
||||||
|
@ -175,19 +175,19 @@ dnl investigation of problems with "64" system and library calls on
|
||||||
dnl Darwin (MacOS X). The libguile code (_scm.h) assumes that if a
|
dnl Darwin (MacOS X). The libguile code (_scm.h) assumes that if a
|
||||||
dnl system has stat64, it will have all the other 64 APIs too; but on
|
dnl system has stat64, it will have all the other 64 APIs too; but on
|
||||||
dnl Darwin, stat64 is there but other APIs are missing.
|
dnl Darwin, stat64 is there but other APIs are missing.
|
||||||
dnl
|
dnl
|
||||||
dnl It also appears, from the Darwin docs, that most system call APIs
|
dnl It also appears, from the Darwin docs, that most system call APIs
|
||||||
dnl there (i.e. the traditional ones _without_ "64" in their names) have
|
dnl there (i.e. the traditional ones _without_ "64" in their names) have
|
||||||
dnl been 64-bit-capable for a long time now, so it isn't necessary to
|
dnl been 64-bit-capable for a long time now, so it isn't necessary to
|
||||||
dnl use "64" versions anyway. For example, Darwin's off_t is 64-bit.
|
dnl use "64" versions anyway. For example, Darwin's off_t is 64-bit.
|
||||||
dnl
|
dnl
|
||||||
dnl A similar problem has been reported for HP-UX:
|
dnl A similar problem has been reported for HP-UX:
|
||||||
dnl http://www.nabble.com/Building-guile-1.8.2-on-hpux-td13106681.html
|
dnl http://www.nabble.com/Building-guile-1.8.2-on-hpux-td13106681.html
|
||||||
dnl
|
dnl
|
||||||
dnl Therefore, and also because a Guile without LARGEFILE64 support is
|
dnl Therefore, and also because a Guile without LARGEFILE64 support is
|
||||||
dnl better than no Guile at all, we provide this option to suppress
|
dnl better than no Guile at all, we provide this option to suppress
|
||||||
dnl trying to use "64" calls.
|
dnl trying to use "64" calls.
|
||||||
dnl
|
dnl
|
||||||
dnl It may be that for some 64-bit function on Darwin/HP-UX we do need
|
dnl It may be that for some 64-bit function on Darwin/HP-UX we do need
|
||||||
dnl to use a "64" call, and hence that by using --without-64-calls we're
|
dnl to use a "64" call, and hence that by using --without-64-calls we're
|
||||||
dnl missing out on that. If so, someone can work on that in the future.
|
dnl missing out on that. If so, someone can work on that in the future.
|
||||||
|
@ -850,7 +850,7 @@ volatile complex double z = - _Complex_I;
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
z = csqrt (z);
|
z = csqrt (z);
|
||||||
if (creal (z) > 0.0)
|
if (creal (z) > 0.0)
|
||||||
return 0; /* good */
|
return 0; /* good */
|
||||||
else
|
else
|
||||||
|
@ -914,9 +914,9 @@ AC_CHECK_SIZEOF(size_t)
|
||||||
AC_CHECK_SIZEOF(ssize_t)
|
AC_CHECK_SIZEOF(ssize_t)
|
||||||
ffi_size_type=uint$(($ac_cv_sizeof_size_t*8))
|
ffi_size_type=uint$(($ac_cv_sizeof_size_t*8))
|
||||||
ffi_ssize_type=sint$(($ac_cv_sizeof_ssize_t*8))
|
ffi_ssize_type=sint$(($ac_cv_sizeof_ssize_t*8))
|
||||||
AC_DEFINE_UNQUOTED([ffi_type_size_t], ffi_type_${ffi_size_type},
|
AC_DEFINE_UNQUOTED([ffi_type_size_t], ffi_type_${ffi_size_type},
|
||||||
[ffi type for size_t])
|
[ffi type for size_t])
|
||||||
AC_DEFINE_UNQUOTED([ffi_type_ssize_t], ffi_type_${ffi_ssize_type},
|
AC_DEFINE_UNQUOTED([ffi_type_ssize_t], ffi_type_${ffi_ssize_type},
|
||||||
[ffi type for ssize_t])
|
[ffi type for ssize_t])
|
||||||
|
|
||||||
dnl i18n tests
|
dnl i18n tests
|
||||||
|
@ -1271,7 +1271,7 @@ LIBS="$save_LIBS"
|
||||||
|
|
||||||
AC_CHECK_SIZEOF(float)
|
AC_CHECK_SIZEOF(float)
|
||||||
if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
|
if test "$ac_cv_sizeof_float" -le "$ac_cv_sizeof_long"; then
|
||||||
AC_DEFINE([SCM_SINGLES], 1,
|
AC_DEFINE([SCM_SINGLES], 1,
|
||||||
[Define this if floats are the same size as longs.])
|
[Define this if floats are the same size as longs.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1402,7 +1402,7 @@ case "$with_threads" in
|
||||||
|
|
||||||
# On Solaris, sched_yield lives in -lrt.
|
# On Solaris, sched_yield lives in -lrt.
|
||||||
AC_SEARCH_LIBS(sched_yield, rt)
|
AC_SEARCH_LIBS(sched_yield, rt)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -1478,7 +1478,7 @@ GUILE_THREAD_LOCAL_STORAGE
|
||||||
fi # with_threads=pthreads
|
fi # with_threads=pthreads
|
||||||
|
|
||||||
|
|
||||||
## Cross building
|
## Cross building
|
||||||
if test "$cross_compiling" = "yes"; then
|
if test "$cross_compiling" = "yes"; then
|
||||||
AC_MSG_CHECKING(cc for build)
|
AC_MSG_CHECKING(cc for build)
|
||||||
## /usr/bin/cc still uses wrong assembler
|
## /usr/bin/cc still uses wrong assembler
|
||||||
|
@ -1486,8 +1486,8 @@ if test "$cross_compiling" = "yes"; then
|
||||||
CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
|
CC_FOR_BUILD="${CC_FOR_BUILD-PATH=/usr/bin:$PATH cc}"
|
||||||
else
|
else
|
||||||
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
|
CC_FOR_BUILD="${CC_FOR_BUILD-$CC}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## AC_MSG_CHECKING("if we are cross compiling")
|
## AC_MSG_CHECKING("if we are cross compiling")
|
||||||
## AC_MSG_RESULT($cross_compiling)
|
## AC_MSG_RESULT($cross_compiling)
|
||||||
if test "$cross_compiling" = "yes"; then
|
if test "$cross_compiling" = "yes"; then
|
||||||
|
@ -1500,14 +1500,14 @@ CCLD_FOR_BUILD="$CC_FOR_BUILD"
|
||||||
AC_SUBST(cross_compiling)
|
AC_SUBST(cross_compiling)
|
||||||
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
|
AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler])
|
||||||
AC_SUBST(CCLD_FOR_BUILD)
|
AC_SUBST(CCLD_FOR_BUILD)
|
||||||
|
|
||||||
## libtool erroneously calls CC_FOR_BUILD HOST_CC;
|
## libtool erroneously calls CC_FOR_BUILD HOST_CC;
|
||||||
## --HOST is the platform that PACKAGE is compiled for.
|
## --HOST is the platform that PACKAGE is compiled for.
|
||||||
HOST_CC="$CC_FOR_BUILD"
|
HOST_CC="$CC_FOR_BUILD"
|
||||||
AC_SUBST(HOST_CC)
|
AC_SUBST(HOST_CC)
|
||||||
|
|
||||||
GUILE_CHECK_GUILE_FOR_BUILD
|
GUILE_CHECK_GUILE_FOR_BUILD
|
||||||
|
|
||||||
## If we're using GCC, add flags to reduce strictness of undefined
|
## If we're using GCC, add flags to reduce strictness of undefined
|
||||||
## behavior, and ask for aggressive warnings.
|
## behavior, and ask for aggressive warnings.
|
||||||
GCC_CFLAGS=""
|
GCC_CFLAGS=""
|
||||||
|
@ -1524,8 +1524,7 @@ case "$GCC" in
|
||||||
## <http://lists.gnu.org/archive/html/guile-devel/2012-01/msg00487.html>.
|
## <http://lists.gnu.org/archive/html/guile-devel/2012-01/msg00487.html>.
|
||||||
|
|
||||||
POTENTIAL_GCC_CFLAGS="-Wall -Wmissing-prototypes \
|
POTENTIAL_GCC_CFLAGS="-Wall -Wmissing-prototypes \
|
||||||
-Wdeclaration-after-statement -Wpointer-arith \
|
-Wpointer-arith -Wswitch-enum -fno-strict-aliasing -fwrapv"
|
||||||
-Wswitch-enum -fno-strict-aliasing -fwrapv"
|
|
||||||
# Do this here so we don't screw up any of the tests above that might
|
# Do this here so we don't screw up any of the tests above that might
|
||||||
# not be "warning free"
|
# not be "warning free"
|
||||||
if test "${GUILE_ERROR_ON_WARNING}" = yes
|
if test "${GUILE_ERROR_ON_WARNING}" = yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue