Index: configure =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: configure ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Index: menuselect.c =================================================================== --- menuselect.c (revision 807) +++ menuselect.c (working copy) @@ -31,6 +31,7 @@ #include #include +#include "autoconfig.h" #include "mxml/mxml.h" #include "linkedlists.h" #include "menuselect.h" @@ -344,6 +345,27 @@ cur3 && cur3->child; cur3 = mxmlFindElement(cur3, cur2, "use", NULL, NULL, MXML_NO_DESCEND)) { +#if !defined(HAVE_ATTRIBUTE_weak_import) && !defined(HAVE_ATTRIBUTE_weakref) + /* If the compiler won't support the functionality required for "use", then "use" -> "depend" */ + if (!(dep = calloc(1, sizeof(*dep)))) { + free_member(mem); + return -1; + } + if ((tmp = mxmlElementGetAttr(cur3, "name"))) { + if (!strlen_zero(tmp)) { + dep->name = tmp; + } + } + if (!strlen_zero(cur3->child->value.opaque)) { + dep->displayname = cur3->child->value.opaque; + if (!dep->name) { + dep->name = dep->displayname; + } + AST_LIST_INSERT_TAIL(&mem->deps, dep, list); + } else { + free(dep); + } +#else if (!(use = calloc(1, sizeof(*use)))) { free_member(mem); return -1; @@ -361,6 +383,7 @@ AST_LIST_INSERT_TAIL(&mem->uses, use, list); } else free(use); +#endif } if (add_member(mem, cat)) Index: autoconfig.h.in =================================================================== --- autoconfig.h.in (revision 807) +++ autoconfig.h.in (working copy) @@ -26,6 +26,12 @@ /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF +/* Define to 1 if your GCC C compiler supports the 'weak_import' attribute. */ +#undef HAVE_ATTRIBUTE_weak_import + +/* Define to 1 if your GCC C compiler supports the 'weakref' attribute. */ +#undef HAVE_ATTRIBUTE_weakref + /* Define to indicate the ${CURSES_DESCRIP} library */ #undef HAVE_CURSES @@ -101,9 +107,6 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME -/* Define to the home page for this package. */ -#undef PACKAGE_URL - /* Define to the version of this package. */ #undef PACKAGE_VERSION Index: configure.ac =================================================================== --- configure.ac (revision 807) +++ configure.ac (working copy) @@ -51,6 +51,9 @@ esac]) AC_SUBST(MENUSELECT_DEBUG) +AST_GCC_ATTRIBUTE(weak_import) +AST_GCC_ATTRIBUTE(weakref) + AC_FUNC_ALLOCA AC_CHECK_FUNCS([asprintf getloadavg setenv strcasestr strndup strnlen strsep unsetenv vasprintf]) Index: aclocal.m4 =================================================================== --- aclocal.m4 (revision 807) +++ aclocal.m4 (working copy) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved.