Revision 3316

View differences:

libsylph/utils.c
52 52
#  include <shlobj.h>
53 53
#endif
54 54

  
55
#ifdef __APPLE__
56
#  include <AppKit/AppKit.h>
57
#endif
58

  
55 59
#include "utils.h"
56 60
#include "socket.h"
57 61

  
......
2129 2133
		} else
2130 2134
			startup_dir = g_get_current_dir();
2131 2135
	}
2136
#elif defined(__APPLE__)
2137
	if (!startup_dir) {
2138
		const gchar *path;
2139
		NSAutoreleasePool *pool;
2140

  
2141
		pool = [[NSAutoreleasePool alloc] init];
2142

  
2143
		path = [[[NSBundle mainBundle] bundlePath] UTF8String];
2144
		startup_dir = g_strdup(path);
2145

  
2146
		[pool release];
2147

  
2148
		if (!startup_dir)
2149
			startup_dir = g_get_current_dir();
2150
	}
2132 2151
#else
2133 2152
	if (!startup_dir)
2134 2153
		startup_dir = g_get_current_dir();
libsylph/Makefile.am
4 4
	-DSYSCONFDIR=\""$(sysconfdir)"\" \
5 5
	-DLOCALEDIR=\""$(localedir)"\"
6 6

  
7
INCLUDES = -I$(top_srcdir) $(GLIB_CFLAGS)
7
INCLUDES = -I$(top_srcdir) $(GLIB_CFLAGS) $(LIBSYLPH_CFLAGS)
8 8

  
9 9
lib_LTLIBRARIES = libsylph-0.la
10 10
#noinst_LTLIBRARIES = libsylph.la
configure.in
78 78
case "$target" in
79 79
*-darwin*)
80 80
	CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
81
	LIBSYLPH_CFLAGS="$LIBSYLPH_CFLAGS -xobjective-c"
81 82
	;;
82 83
*-*-mingw*)
83 84
	native_win32=yes
......
87 88
	;;
88 89
esac
89 90

  
91
AC_SUBST(LIBSYLPH_CFLAGS)
92

  
90 93
AM_CONDITIONAL(NATIVE_WIN32, test "$native_win32" = "yes")
91 94

  
92 95
dnl Checks for libraries.
ChangeLog
1
2013-12-13
2

  
3
	* libsylph/utils.c: set_startup_dir(): OS X: set application bundle
4
	  directory rather than /.
5
	* configure.in
6
	  libsylph/Makefile.am: OS X: added -xobjective-c option.
7

  
1 8
2013-11-29
2 9

  
3 10
	* version 3.4.0beta7

Also available in: Unified diff