3734. [bug] Improve building with libtool. [RT #35314]
(cherry picked from commit 61eea10d81)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
3734. [bug] Improve building with libtool. [RT #35314]
|
||||
|
||||
3732. [contrib] Fixed a type mismatch causing the ODBC DLZ
|
||||
driver to dump core on 64-bit systems. [RT #35324]
|
||||
|
||||
|
||||
@@ -661,6 +661,7 @@ CONTRIB_DLZ
|
||||
PG_CONFIG
|
||||
SO_TARGETS
|
||||
SO_LD
|
||||
SO_LDFLAGS
|
||||
SO_CFLAGS
|
||||
SO
|
||||
BIND9_CONFIGARGS
|
||||
@@ -18896,6 +18897,7 @@ DLZ_SYSTEM_TEST=""
|
||||
#
|
||||
SO="so"
|
||||
SO_CFLAGS=""
|
||||
SO_LDFLAGS=""
|
||||
SO_LD=""
|
||||
SO_TARGETS=""
|
||||
|
||||
@@ -18979,29 +18981,36 @@ if test "$dlopen" = "yes"; then
|
||||
case $host in
|
||||
*-linux*)
|
||||
SO_CFLAGS="-fPIC"
|
||||
SO_LDFLAGS=""
|
||||
if test "$have_dl" = "yes"
|
||||
then
|
||||
if test "$use_libtool" = "yes"; then
|
||||
SO_LD="${CC} -Xcompiler -shared"
|
||||
SO_LDFLAGS="-Xcompiler -shared"
|
||||
SO_LD="${CC}"
|
||||
else
|
||||
SO_LD="${CC} -shared"
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="${CC}"
|
||||
fi
|
||||
else
|
||||
SO_LD="ld -shared"
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="ld"
|
||||
fi
|
||||
;;
|
||||
*-freebsd*|*-openbsd*|*-netbsd*)
|
||||
SO_CFLAGS="-fpic"
|
||||
SO_LD="ld -Bshareable -x"
|
||||
SO_LDFLAGS="-Bshareable -x"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*-solaris*)
|
||||
SO_CFLAGS="-KPIC"
|
||||
SO_LD="ld -G -z text"
|
||||
SO_LDFLAGS="-G -z text"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*-hp-hpux*)
|
||||
SO=sl
|
||||
SO_CFLAGS="+z"
|
||||
SO_LD="ld -b"
|
||||
SO_LDFLAGS="-b"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*)
|
||||
SO_CFLAGS="-fPIC"
|
||||
@@ -19010,7 +19019,16 @@ if test "$dlopen" = "yes"; then
|
||||
|
||||
if test "X$GCC" = "Xyes"; then
|
||||
SO_CFLAGS="-fPIC"
|
||||
test -n "$SO_LD" || SO_LD="${CC} -shared"
|
||||
if test -z "$SO_LD"
|
||||
then
|
||||
if test "$use_libtool" = "yes"; then
|
||||
SO_LDFLAGS="-Xcompiler -shared"
|
||||
SO_LD="${CC}"
|
||||
else
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="${CC}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If we still don't know how to make shared objects, don't make any.
|
||||
@@ -19027,6 +19045,7 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
|
||||
+25
-7
@@ -3341,6 +3341,7 @@ DLZ_SYSTEM_TEST=""
|
||||
#
|
||||
SO="so"
|
||||
SO_CFLAGS=""
|
||||
SO_LDFLAGS=""
|
||||
SO_LD=""
|
||||
SO_TARGETS=""
|
||||
|
||||
@@ -3365,29 +3366,36 @@ if test "$dlopen" = "yes"; then
|
||||
case $host in
|
||||
*-linux*)
|
||||
SO_CFLAGS="-fPIC"
|
||||
SO_LDFLAGS=""
|
||||
if test "$have_dl" = "yes"
|
||||
then
|
||||
if test "$use_libtool" = "yes"; then
|
||||
SO_LD="${CC} -Xcompiler -shared"
|
||||
SO_LDFLAGS="-Xcompiler -shared"
|
||||
SO_LD="${CC}"
|
||||
else
|
||||
SO_LD="${CC} -shared"
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="${CC}"
|
||||
fi
|
||||
else
|
||||
SO_LD="ld -shared"
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="ld"
|
||||
fi
|
||||
;;
|
||||
*-freebsd*|*-openbsd*|*-netbsd*)
|
||||
SO_CFLAGS="-fpic"
|
||||
SO_LD="ld -Bshareable -x"
|
||||
SO_LDFLAGS="-Bshareable -x"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*-solaris*)
|
||||
SO_CFLAGS="-KPIC"
|
||||
SO_LD="ld -G -z text"
|
||||
SO_LDFLAGS="-G -z text"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*-hp-hpux*)
|
||||
SO=sl
|
||||
SO_CFLAGS="+z"
|
||||
SO_LD="ld -b"
|
||||
SO_LDFLAGS="-b"
|
||||
SO_LD="ld"
|
||||
;;
|
||||
*)
|
||||
SO_CFLAGS="-fPIC"
|
||||
@@ -3396,7 +3404,16 @@ if test "$dlopen" = "yes"; then
|
||||
|
||||
if test "X$GCC" = "Xyes"; then
|
||||
SO_CFLAGS="-fPIC"
|
||||
test -n "$SO_LD" || SO_LD="${CC} -shared"
|
||||
if test -z "$SO_LD"
|
||||
then
|
||||
if test "$use_libtool" = "yes"; then
|
||||
SO_LDFLAGS="-Xcompiler -shared"
|
||||
SO_LD="${CC}"
|
||||
else
|
||||
SO_LDFLAGS="-shared"
|
||||
SO_LD="${CC}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# If we still don't know how to make shared objects, don't make any.
|
||||
@@ -3409,6 +3426,7 @@ fi
|
||||
|
||||
AC_SUBST(SO)
|
||||
AC_SUBST(SO_CFLAGS)
|
||||
AC_SUBST(SO_LDFLAGS)
|
||||
AC_SUBST(SO_LD)
|
||||
AC_SUBST(SO_TARGETS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user