Check for asprintf and vasprintf during configure stage.
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 28 Jul 2015 07:57:32 +0000 (09:57 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 28 Jul 2015 07:57:32 +0000 (09:57 +0200)
This should fix some build errors seen on AIX, MinGW, and possibly other
non-GNU systems too due to missing asprintf().

bfd/

* configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
* config.in, configure: Regenerate.

bfd/ChangeLog
bfd/config.in
bfd/configure
bfd/configure.ac

index ebab48bb4512e90ee663a22f6a25dca46bc7f6c5..c06c213b4b3a19684f13783d52e140c0c07825a6 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-28  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
+       * config.in, configure: Regenerate.
+
 2015-07-27  H.J. Lu  <hongjiu.lu@intel.com>
 
        * configure: Regenerated.
index 1ee10817527f9d90936038f5fe5dac225f5f3ca1..58248bd9b7c359a47d09903981a3d0eb255829cf 100644 (file)
 /* Define to 1 if you have the <alloca.h> header file. */
 #undef HAVE_ALLOCA_H
 
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ASPRINTF
+
 /* Define to 1 if you have the declaration of `basename', and to 0 if you
    don't. */
 #undef HAVE_DECL_BASENAME
    */
 #undef HAVE_DECL_STRSTR
 
+/* Define to 1 if you have the declaration of `vasprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_VASPRINTF
+
 /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
    don't. */
 #undef HAVE_DECL_VSNPRINTF
index 1ea612b5521e6336ff02c1e3b236ae65c31fac06..a17e936c43c2c8c9b424003c5cb18c30fc7492a4 100755 (executable)
@@ -13819,6 +13819,28 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_STRSTR $ac_have_decl
 _ACEOF
 
+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_asprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ASPRINTF $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_VASPRINTF $ac_have_decl
+_ACEOF
+
 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
 if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
   ac_have_decl=1
index 4225f7d426f0c704b04682bc05271a554fdb9a39..2a38842b802d3108d2bd3aca94634ad3a23b91c3 100644 (file)
@@ -232,6 +232,8 @@ AC_CHECK_DECLS(malloc)
 AC_CHECK_DECLS(realloc)
 AC_CHECK_DECLS(stpcpy)
 AC_CHECK_DECLS(strstr)
+AC_CHECK_DECLS(asprintf)
+AC_CHECK_DECLS(vasprintf)
 AC_CHECK_DECLS(snprintf)
 AC_CHECK_DECLS(vsnprintf)
 AC_CHECK_DECLS(strnlen)
This page took 0.036018 seconds and 4 git commands to generate.