]> git.sesse.net Git - vlc/blobdiff - configure.ac.in
* ./include/vlc_messages.h: msg_* functions now use the same argument type
[vlc] / configure.ac.in
index 9b68b0c669b3ece19e442263b1f8a0a22ae9dd73..d65dd369c83c1ea5a30914f066617e58eccac2a8 100644 (file)
@@ -663,6 +663,19 @@ if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
         [${ac_cv_c_attribute_aligned}],[Maximum supported data alignment])
 fi
 
+dnl Checks for __attribute__(format()) directive
+AC_CACHE_CHECK([__attribute__ ((format ())) support with function pointers],
+    [ac_cv_c_attribute_format],
+    [ac_cv_c_attribute_format=no
+        CFLAGS="${CFLAGS_save} -Werror"
+        AC_TRY_COMPILE([],
+        [static void (*pf_printf)(const char *, ...) __attribute__ ((format(printf,1,2)));(void)pf_printf;],
+        [ac_cv_c_attribute_format=yes])
+        CFLAGS="${CFLAGS_save}"])
+if test "x${ac_cv_c_attribute_format}" != "xno"; then
+    AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
+fi
+
 dnl
 dnl  Check the CPU
 dnl