2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

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

This commit is contained in:
Mark Andrews
2014-02-10 15:01:06 +11:00
parent d9bbd9c64f
commit d7729155df
4 changed files with 312 additions and 272 deletions

View File

@@ -1,3 +1,5 @@
3734. [bug] Improve building with libtool. [RT #35314]
3733. [func] Improve interface scanning support. Interface
information will be automatically updated if the
OS supports routing sockets (MacOS, *BSD, Linux).

View File

@@ -43,13 +43,14 @@ OBJS = ${DLOPENOBJS}
@BIND9_MAKE_RULES@
CFLAGS = @CFLAGS@ @SO_CFLAGS@
SO_LDFLAGS = @LDFLAGS@ @SO_LDFLAGS@
dlopen@EXEEXT@: ${DLOPENOBJS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
-o $@ ${DLOPENOBJS} ${LIBS}
driver.@SO@: ${SO_OBJS}
${LIBTOOL_MODE_LINK} @SO_LD@ -o $@ driver.@O@
${LIBTOOL_MODE_LINK} @SO_LD@ ${SO_LDFLAGS} -o $@ driver.@O@
clean distclean::
rm -f ${TARGETS}

33
configure vendored
View File

@@ -661,6 +661,7 @@ CONTRIB_DLZ
PG_CONFIG
SO_TARGETS
SO_LD
SO_LDFLAGS
SO_CFLAGS
SO
BIND9_CONFIGARGS
@@ -19828,6 +19829,7 @@ DLZ_SYSTEM_TEST=""
#
SO="so"
SO_CFLAGS=""
SO_LDFLAGS=""
SO_LD=""
SO_TARGETS=""
@@ -19911,29 +19913,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"
@@ -19942,7 +19951,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.
@@ -19959,6 +19977,7 @@ fi
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any

View File

@@ -3749,6 +3749,7 @@ DLZ_SYSTEM_TEST=""
#
SO="so"
SO_CFLAGS=""
SO_LDFLAGS=""
SO_LD=""
SO_TARGETS=""
@@ -3773,29 +3774,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"
@@ -3804,7 +3812,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.
@@ -3817,6 +3834,7 @@ fi
AC_SUBST(SO)
AC_SUBST(SO_CFLAGS)
AC_SUBST(SO_LDFLAGS)
AC_SUBST(SO_LD)
AC_SUBST(SO_TARGETS)