$OpenBSD: patch-autoconf_aclocal_m4,v 1.4 2006/01/07 14:19:29 bernd Exp $ --- autoconf/aclocal.m4.orig Sun Mar 23 03:06:40 2003 +++ autoconf/aclocal.m4 Tue Apr 14 20:14:02 2009 @@ -86,7 +86,7 @@ case "$host_os" in fi fi ;; - *osf*) + *osf* | *openbsd* | *fabbsd*) if test "X$GCC" = Xyes then RPATH="-Wl,-rpath," @@ -482,8 +482,8 @@ AC_CHECK_HEADER(dlfcn.h,[ AC_SUBST(DYNAMIC_LINK_LIB) ELFLIB="lib\$(THIS_LIB).so" -ELFLIB_MAJOR="\$(ELFLIB).\$(ELF_MAJOR_VERSION)" -ELFLIB_MAJOR_MINOR="\$(ELFLIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERSION)" +ELFLIB_MAJOR="\$(ELFLIB).\$(LIBslang_MAJOR)" +ELFLIB_MAJOR_MINOR="\$(ELFLIB).\$(LIBslang_MAJOR).\$(LIBslang_MINOR)" case "$host_os" in *linux* ) @@ -571,6 +571,25 @@ case "$host_os" in ELFLIB="lib\$(THIS_LIB).dylib" ELFLIB_MAJOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).dylib" ELFLIB_MAJOR_MINOR="lib\$(THIS_LIB).\$(ELF_MAJOR_VERSION).\$(ELF_MINOR_VERSION).dylib" + ;; + *openbsd* | *fabbsd*) + DYNAMIC_LINK_FLAGS="" + ELF_CC="$CC" + case `arch -s` in + sparc64) + ELF_CFLAGS="$CFLAGS -fPIC" + ;; + *) + ELF_CFLAGS="$CFLAGS -fpic" + ;; + esac + ELF_LINK="$CC -shared $ELF_CFLAGS" + ELF_LINK_CMD="\$(ELF_LINK)" + ELF_DEP_LIBS= + CC_SHARED="$CC -shared $ELF_CFLAGS" + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then + DYNAMIC_LINK_FLAGS="-Wl,-E" + fi ;; * ) echo "Note: ELF compiler for host_os=$host_os may be wrong"