diff options
-rw-r--r-- | configure.ac | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac index d9d2413..34ed2e3 100644 --- a/configure.ac +++ b/configure.ac @@ -133,42 +133,6 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.38]) PKG_CHECK_MODULES([GOBJECT], [gobject-2.0]) PKG_CHECK_MODULES([GMODULE], [gmodule-2.0]) -# Check for g_clear_pointer -have_g_clear_pointer='no' -PKG_CHECK_EXISTS([glib-2.0 >= 2.34], - [have_g_clear_pointer='yes']) -AS_VAR_IF([have_g_clear_pointer], [no], - [AC_MSG_CHECKING([for g_clear_pointer]) - GUPNP_DLNA_TEMP_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - GUPNP_DLNA_TEMP_LIBS="$LIBS" - LIBS="$LIBS $GLIB_LIBS" - AC_LANG([C]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ - #include <glib.h> - ]], - [[ - gchar *test = g_malloc (2); - g_clear_pointer (&test, g_free); - return (test == NULL) - ]])], - [have_g_clear_pointer='yes']) - LIBS="$GUPNP_DLNA_TEMP_LIBS" - CFLAGS="$GUPNP_DLNA_TEMP_CFLAGS" - AC_MSG_RESULT([$have_g_clear_pointer])]) - -AS_VAR_IF([have_g_clear_pointer], [no], - [AC_DEFINE([g_clear_pointer(ptr, func)], - [\ - G_STMT_START { \ - if (ptr != NULL && func != NULL) { \ - gpointer g_clear_pointer_tmp_var = *ptr; \ - *ptr = NULL; \ - func (g_clear_pointer_tmp_var); \ - } \ - } G_STMT_END], - [Naive g_clear_pointer implementation.])]) - # Debugging AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]), |