Add a check for the Darwin dynamic linker. Use AC_TRY_LINK when checking

* configure.in: Add a check for the Darwin dynamic linker. Use
        AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices
        "no getpwuid_r" correctly.

        * testglib.c (main): Make template[] bigger to prevent an overrun.
        Remove an unused variable. Initialize error to NULL.

        * tests/gio-test.c (main): Add a cast to prevent a warning when
        size_t is a long.

        * tests/type-test.c (main): Add an #ifdef to prevent a warning
        when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't.
This commit is contained in:
Dan Winship
2001-04-20 17:08:57 +00:00
parent d7daf59800
commit 655d467602
13 changed files with 138 additions and 9 deletions

View File

@@ -659,7 +659,7 @@ if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
G_MODULE_IMPL=G_MODULE_IMPL_BEOS],
[])
fi
# *** dlopen() and dlsym() in libdl
dnl *** dlopen() and dlsym() in libdl
if test -z "$G_MODULE_IMPL"; then
AC_CHECK_LIB(dl, dlopen,
[AC_CHECK_LIB(dl, dlsym,
@@ -667,6 +667,13 @@ if test -z "$G_MODULE_IMPL"; then
G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
[])
fi
dnl *** NSLinkModule (dyld) in system libraries (Darwin)
if test -z "$G_MODULE_IMPL"; then
AC_CHECK_FUNC(NSLinkModule,
[G_MODULE_IMPL=G_MODULE_IMPL_DYLD
G_MODULE_NEED_USCORE=1],
[])
fi
dnl *** shl_load() in libdld (HP-UX)
if test -z "$G_MODULE_IMPL"; then
AC_MSG_CHECKING(how to export all symbols)
@@ -1013,7 +1020,7 @@ if test x"$have_threads" != xnone; then
CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS"
# First we test, whether localtime_r is declared in time.h
# directly. Then we test wether a macro localtime_r exists, in
# directly. Then we test whether a macro localtime_r exists, in
# which case localtime_r in the test program is replaced and thus
# if we still find localtime_r in the output, it is not defined as
# a macro.
@@ -1189,7 +1196,7 @@ if test x"$have_threads" != xnone; then
else
AC_CACHE_CHECK([for nonposix getpwuid_r],
ac_cv_func_nonposix_getpwuid_r,
[AC_TRY_COMPILE([#include <pwd.h>],
[AC_TRY_LINK([#include <pwd.h>],
[char buffer[10000];
struct passwd pwd;
getpwuid_r (0, &pwd, buffer,