Try #3
<snip>
Log:
Added subversion/build/ac-macros/check-gcc-opt.m4, containing one function
SVN_LIB_CHECK_GCC_OPTION. This checks whether the option is supported by the
GCC compiler on the target platform.
Added call to SVN_LIB_CHECK_GCC_OPTION in subversion/configure.in, to see if
std=c89 should be added to CFLAGS.
Index: subversion-0.24.2/configure.in
===================================================================
--- configure.in 2003-06-19 02:35:41.000000000 +1000
+++ configure.in.leif 2003-07-04 14:59:50.494904000 +1000
@@ -51,6 +51,7 @@
dnl Grab our own macros
sinclude(build/ac-macros/berkeley-db.m4)
+sinclude(build/ac-macros/check-gcc-opt.m4)
sinclude(build/ac-macros/svn-apache.m4)
sinclude(build/ac-macros/svn-macros.m4)
sinclude(build/ac-macros/neon.m4)
@@ -391,7 +392,17 @@
if test "$GCC" = "yes"; then
dnl SVN_DEBUG enables specific features for developer builds
dnl AP_DEBUG enables specific (Apache) features for developer
builds
- CFLAGS="$CFLAGS -std=c89 -Wpointer-arith -Wwrite-strings -Wshadow
-DSVN_DEBUG -DAP_DEBUG";
+
+ CFLAGS="$CFLAGS -Wpointer-arith -Wwrite-strings -Wshadow -DSVN_DEBUG
-DAP_DEBUG";
+
+ dnl Check the compiler options
+ SVN_LIB_CHECK_GCC_OPTION(["-std=c89"])
+
+ if test "$svn_lib_check_option" = "yes" ; then
+ CFLAGS="$CFLAGS -std=c89"
+ else
+ CFLAGS="$CFLAGS -ansi"
+ fi
fi
fi
])
Index: subversion-0.24.2/build/ac-macros/check-gcc-opt.m4
===================================================================
dnl SVN_LIB_CHECK_GCC_OPTION(option)
dnl
dnl Compile a little C program with the passed in option
dnl and see if it was successfully compiled.
AC_DEFUN(SVN_LIB_CHECK_GCC_OPTION,
[
option=$1
svn_lib_check_gcc_option_save_flags="$CFLAGS"
CFLAGS="$option"
AC_TRY_COMPILE(
[],
[],
[svn_lib_check_option=yes],
[svn_lib_check_option=no],
)
CFLAGS="$svn_lib_check_gcc_option_save_flags"
]
)
**********************************************************************
IMPORTANT
The contents of this e-mail and its attachments are confidential and intended
solely for the use of the individual or entity to whom they are
addressed. If you received this e-mail in error, please notify
the HPA Postmaster, postmaster@hpa.com.au, then delete
the e-mail.
This footnote also confirms that this e-mail message has been swept for
the presence of computer viruses by MimeSweeper. Before opening or
using any attachments, check them for viruses and defects.
Our liability is limited to resupplying any affected attachments.
HPA collects personal information to provide and market our services.
For more information about use, disclosure and access see our Privacy
Policy at www.hpa.com.au
**********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 11 09:36:04 2003