summaryrefslogtreecommitdiff
path: root/libgfortran/configure
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-23 13:03:35 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-23 13:03:35 +0000
commit3b99ec70a69f55388d8cf2f8e433ee93f5edbaa5 (patch)
tree9abbc0a4bb0fdbe3f645d62bc422147e4a4c80db /libgfortran/configure
parent81a1889553d10bcb8b160ba45ac4d99e8cf0eae6 (diff)
downloadgcc-3b99ec70a69f55388d8cf2f8e433ee93f5edbaa5.tar.gz
PR libfortran/23138
* acinclude.m4 (LIBGFOR_CHECK_MINGW_SNPRINTF): New check. * configure.ac: Use LIBGFOR_CHECK_MINGW_SNPRINTF. * libgfortran.h: If HAVE_MINGW_SNPRINTF is true, use __mingw_snprintf instead of snprintf. * config.h.in: Regenerate. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127739 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-xlibgfortran/configure77
1 files changed, 77 insertions, 0 deletions
diff --git a/libgfortran/configure b/libgfortran/configure
index c68cb7436b7..f71c5900f2e 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -31797,6 +31797,83 @@ _ACEOF
fi
+# Check whether __mingw_snprintf() is present
+
+ echo "$as_me:$LINENO: checking whether __mingw_snprintf is present" >&5
+echo $ECHO_N "checking whether __mingw_snprintf is present... $ECHO_C" >&6
+if test "${have_mingw_snprintf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test x$gcc_no_link = xyes; then
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+extern int __mingw_snprintf (char *, size_t, const char *, ...);
+
+int
+main ()
+{
+
+__mingw_snprintf (NULL, 0, "%d\n", 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "have_mingw_snprintf=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "have_mingw_snprintf=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $have_mingw_snprintf" >&5
+echo "${ECHO_T}$have_mingw_snprintf" >&6
+ if test x"$have_mingw_snprintf" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MINGW_SNPRINTF 1
+_ACEOF
+
+ fi
+
+
# Check for GNU libc feenableexcept
echo "$as_me:$LINENO: checking for feenableexcept in -lm" >&5
echo $ECHO_N "checking for feenableexcept in -lm... $ECHO_C" >&6