+2010-05-25 Zoltan Varga <vargaz@gmail.com>
+
+ * Applied patch from Burkhard Linke (blinke@cebitec.uni-bielefeld.de). Fix
+ building on solaris.
+
2010-05-21 Zoltan Varga <vargaz@gmail.com>
* src/gmisc-win32.c (g_setenv): Use the
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
AC_CHECK_FUNCS(strndup strlcpy getpwent_r strtok_r rewinddir vasprintf)
+AM_CONDITIONAL(NEED_VASPRINTF, test x$have_vasprintf = x )
AC_CHECK_LIB(iconv, iconv_open, LIBS="$LIBS -liconv")
AC_CHECK_LIB(iconv, libiconv_open, LIBS="$LIBS -liconv")
AC_SEARCH_LIBS(sqrtf, m)
+
+# nanosleep may not be part of libc, also search it in other libraries
+AC_SEARCH_LIBS(nanosleep, rt)
+
AC_SEARCH_LIBS(dlopen, dl)
old_ldflags="${LDFLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
win_files = \
gdate-win32.c gdir-win32.c gfile-win32.c gmisc-win32.c \
- gmodule-win32.c gtimer-win32.c vasprintf.c
+ gmodule-win32.c gtimer-win32.c
unix_files = \
gdate-unix.c gdir-unix.c gfile-unix.c gmisc-unix.c \
gmodule-unix.c gtimer-unix.c
+# some unices and windows do not have an implementation of vasprintf
+# used by eglib, use provided implementation instead
+if NEED_VASPRINTF
+vasprintf_files = vasprintf.c
+else
+vaprinttf_files = foo.c
+endif
+
if HOST_WIN32
os_files = $(win_files)
else
gutf8.c \
gunicode.c \
unicode-data.h \
- $(os_files)
+ $(os_files) \
+ $(vasprintf_files)
libeglib_la_CFLAGS = -Wall -D_FORTIFY_SOURCE=2
libeglib_static_la_SOURCES=$(libeglib_la_SOURCES)
extern gint global_passed, global_tests;
+#ifndef HAVE_VASPRINTF
+ /* systen does not provide a vasprintf function, use the one
+ provided within eglib itself */
+extern int vasprintf(char **ret, const char *format, va_list ap);
+#endif
+
static gchar *last_result = NULL;
gboolean