Add support for a number of special directories, as defined by the

2007-06-04  Matthias Clasen  <mclasen@redhat.com>

        Add support for a number of special directories, as
        defined by the xdg-user-dirs specification.  (#432651,
        Bastien Nocera, Emmanuele Bassi, Michael Natterer)

        * glib/glib.symbols:
        * glib/gutils.[hc]: Add the GUserDirectory enum and
        g_get_user_special_dir(), with implementations based
        on the xdg-user-dirs spec and on native interfaces
        for Win32 and Carbon.

        * configure.in: Add Carbon checks.

        * tests/tetsglib.c: Test g_get_user_special_dir().


svn path=/trunk/; revision=5528
This commit is contained in:
Matthias Clasen
2007-06-04 14:54:49 +00:00
committed by Matthias Clasen
parent c68dc0aef5
commit d154485bc7
9 changed files with 448 additions and 1 deletions

View File

@@ -145,11 +145,21 @@ case $host in
;;
esac
AC_MSG_RESULT([$glib_native_win32])
glib_have_carbon=no
AC_MSG_CHECKING([for Mac OS X Carbon support])
AC_TRY_CPP([
#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>
], glib_have_carbon=yes)
AC_MSG_RESULT([$glib_have_carbon])
AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
AM_CONDITIONAL(OS_CARBON, [test "$glib_have_carbon" = "yes"])
AC_SUBST(GLIB_DEF)
AC_SUBST(GMODULE_DEF)
AC_SUBST(GOBJECT_DEF)
@@ -180,6 +190,12 @@ else
fi
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
if test "x$glib_have_carbon" = "xyes"; then
AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
LDFLAGS="$LDFLAGS -framework Carbon"
fi
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],