fix shared library build on darwin

This commit is contained in:
Evan Hunt
2018-12-06 15:52:29 -08:00
parent 5e2cd91321
commit 115736b3f5
2 changed files with 25 additions and 2 deletions

14
configure vendored
View File

@@ -20269,6 +20269,20 @@ else
SO_LDFLAGS="-shared"
SO_LD="${CC}"
fi
;; #(
*-darwin*) :
SO_CFLAGS="-fPIC"
SO_LD="${CC}"
if test "$use_libtool" = "yes"; then :
SO_LDFLAGS="-Xcompiler -dynamiclib -undefined dynamic_lookup"
else
SO_LDFLAGS="-dynamiclib -undefined dynamic_lookup"
fi
;; #(
*-solaris*) :

View File

@@ -2660,6 +2660,15 @@ AS_IF([test "$with_dlopen" = "yes"],
SO_LD="${CC}"
])
],
[*-darwin*],[
SO_CFLAGS="-fPIC"
SO_LD="${CC}"
AS_IF([test "$use_libtool" = "yes"],[
SO_LDFLAGS="-Xcompiler -dynamiclib -undefined dynamic_lookup"
],[
SO_LDFLAGS="-dynamiclib -undefined dynamic_lookup"
])
],
[*-solaris*],[
SO_CFLAGS="-KPIC"
SO_LDFLAGS="-G -z text"
@@ -2947,8 +2956,8 @@ AC_CONFIG_COMMANDS(
#
AC_CONFIG_FILES([
make/Makefile
make/mkdep
make/Makefile
make/mkdep
Makefile
bin/Makefile
bin/check/Makefile