3734. [bug] Improve building with libtool. [RT #35314]

This commit is contained in:
Mark Andrews
2014-02-10 15:23:45 +11:00
parent cefd7fc8ee
commit 61eea10d81
3 changed files with 53 additions and 14 deletions

View File

@@ -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]

33
configure vendored
View File

@@ -661,6 +661,7 @@ CONTRIB_DLZ
PG_CONFIG
SO_TARGETS
SO_LD
SO_LDFLAGS
SO_CFLAGS
SO
BIND9_CONFIGARGS
@@ -19269,6 +19270,7 @@ DLZ_SYSTEM_TEST=""
#
SO="so"
SO_CFLAGS=""
SO_LDFLAGS=""
SO_LD=""
SO_TARGETS=""
@@ -19352,29 +19354,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"
@@ -19383,7 +19392,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.
@@ -19400,6 +19418,7 @@ fi
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any

View File

@@ -3493,6 +3493,7 @@ DLZ_SYSTEM_TEST=""
#
SO="so"
SO_CFLAGS=""
SO_LDFLAGS=""
SO_LD=""
SO_TARGETS=""
@@ -3517,29 +3518,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"
@@ -3548,7 +3556,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.
@@ -3561,6 +3578,7 @@ fi
AC_SUBST(SO)
AC_SUBST(SO_CFLAGS)
AC_SUBST(SO_LDFLAGS)
AC_SUBST(SO_LD)
AC_SUBST(SO_TARGETS)