summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-09-14 01:39:02 +0200
committerGravatar Martin Szulecki2012-03-19 01:43:00 +0100
commit0df63036c888220ea2d5c122f3c19861b0959167 (patch)
tree05febc2ead4e0b426eda479823b2ae1e254c96f4 /configure.ac
parenta87e507134f674f06b3150b1e588a3707c6f4277 (diff)
downloadlibimobiledevice-0df63036c888220ea2d5c122f3c19861b0959167.tar.gz
libimobiledevice-0df63036c888220ea2d5c122f3c19861b0959167.tar.bz2
Refined asprintf/vasprintf detection and inclusion
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 98b0008..1bb33fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,15 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([strcasecmp strdup strerror strndup])
+AC_CHECK_FUNC(asprintf, [have_asprintf="yes"], [have_asprintf="no"])
+if test "x$have_asprintf" = "xyes"; then
+ AC_DEFINE(HAVE_ASPRINTF,1,[define if asprintf is available])
+fi
+AC_CHECK_FUNC(vasprintf, [have_vasprintf="yes"], [have_vasprintf="no"])
+if test "x$have_vasprintf" = "xyes"; then
+ AC_DEFINE(HAVE_VASPRINTF,1,[define if vasprintf is available])
+fi
+
AC_DEFINE(LITTLE_ENDIAN,0,[little endian])
AC_DEFINE(BIG_ENDIAN,1,[big endian])
AC_C_BIGENDIAN([ac_cv_c_bigendian="yes"], [ac_cv_c_bigendian="no"], [], [])