--- configure.in.orig Thu Mar 15 10:37:37 2001 +++ configure.in Mon Oct 1 21:52:37 2001 @@ -544,6 +544,13 @@ if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=G_MODULE_IMPL_DLD ,) fi + +if test "x`uname -s`" = "xOpenBSD" -a "x$enable_shared" = "xyes"; then + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + G_MODULE_LDFLAGS="-Wl,-E" + fi +fi + dnl *** additional checks for G_MODULE_IMPL_DL if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then case "$host_os" in @@ -800,6 +807,12 @@ G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_REE # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support # -mthreads flag. ;; + *-openbsd*) + G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE" + if test "x$G_THREAD_LIBS" = "x-lc_r"; then + G_THREAD_LIBS="-pthread" + fi + ;; esac # if we are not finding the ctime_r function, then we probably are @@ -914,8 +927,6 @@ fi AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c") AC_SUBST(G_THREAD_CFLAGS) AC_SUBST(G_THREAD_LIBS) - -CFLAGS="$CFLAGS $G_THREAD_CFLAGS" dnl ********************************************** dnl *** GDefaultMutex setup and initialization ***