Modified:
branches/guffert/configure.in
Log:
Add explicit test for checking whether we should use --std=c99 with gcc in
order to get support for \u escapes.
Modified: branches/guffert/configure.in
===================================================================
--- branches/guffert/configure.in 2007-08-19 20:12:40 UTC (rev 666)
+++ branches/guffert/configure.in 2007-08-20 17:34:43 UTC (rev 667)
@@ -87,6 +87,29 @@
ac_cv_prog_gcc="no"
fi
+# See if we need --std=c99 for \u escapes
+if test "$ac_cv_prog_gcc" = "yes"
+then
+ CFLAGS="-Werror $CFLAGS"
+ AC_MSG_CHECKING([if --std=c99 is necessary])
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wchar_t *test= L"\u00e3";],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$SAVE_CFLAGS"
+ ],
+ [
+ CFLAGS="--std=c99 $CFLAGS"
+ AC_TRY_COMPILE([#include <wchar.h>],
+ [wchar_t *test= L"\u00e3";],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="--std=c99 $SAVE_CFLAGS"
+ ],
+ [AC_MSG_ERROR([still can't use \u escapes])])
+ ])
+fi
+
# Only build shared libraries by default
AM_ENABLE_SHARED
AM_DISABLE_STATIC
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r667 - branches/guffert | jwinstead | 20 Aug |