Use register_printf_specifier instead of deprecated register_printf_function, if...
[strongswan.git] / configure.in
index 31a5246..ed16e07 100644 (file)
@@ -373,12 +373,18 @@ AC_TRY_RUN(
 [AC_MSG_RESULT([no])])
 
 AC_CHECK_FUNC(
-       [register_printf_function],
-       [AC_DEFINE(HAVE_PRINTF_HOOKS)],
-       [
-               AC_MSG_NOTICE([printf does not support custom format specifiers!])
-               vstr=true
-       ]
+       [register_printf_specifier],
+       dnl new specifier functions with argument length
+       [AC_DEFINE(HAVE_PRINTF_SPECIFIER)],
+       [AC_CHECK_FUNC(
+               dnl deprecated function without argument length
+               [register_printf_function],
+               [AC_DEFINE(HAVE_PRINTF_FUNCTION)],
+               [
+                       AC_MSG_NOTICE([printf does not support custom format specifiers!])
+                       vstr=true
+               ]
+       )]
 )
 
 if test x$vstr = xtrue; then