aboutsummaryrefslogtreecommitdiff
path: root/src/aclocal.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r--src/aclocal.m4119
1 files changed, 101 insertions, 18 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4
index 3228610..24e0b30 100644
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -783,8 +783,8 @@ if test "$with_tcl" != no ; then
AC_CHECK_LIB(ld, main, DL_LIB=-lld)
krb5_save_CPPFLAGS="$CPPFLAGS"
krb5_save_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$TCL_INCLUDES $CPPFLAGS"
- LDFLAGS="$TCL_LIBPATH $LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $TCL_INCLUDES"
+ LDFLAGS="$LDFLAGS $TCL_LIBPATH"
tcl_header=no
AC_CHECK_HEADER(tcl.h,AC_DEFINE(HAVE_TCL_H) tcl_header=yes)
if test $tcl_header=no; then
@@ -1030,8 +1030,18 @@ AC_ARG_ENABLE([shared],
AC_MSG_RESULT([Forcing static libraries.])
# avoid duplicate rules generation for AIX and such
SHLIBEXT=.so-nobuild
+ SHLIBVEXT=.so.v-nobuild
+ SHLIBSEXT=.so.s-nobuild
else
AC_MSG_RESULT([Enabling shared libraries.])
+ # Clear some stuff in case of AIX, etc.
+ if test "$STLIBEXT" = "$SHLIBEXT" ; then
+ STLIBEXT=.a-nobuild
+ LIBLIST=
+ LIBLINKS=
+ OBJLISTS=
+ LIBINSTLIST=
+ fi
LIBLIST="$LIBLIST "'lib$(LIB)$(SHLIBEXT)'
LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIB)$(SHLIBEXT) $(TOPLIBD)/lib$(LIB)$(SHLIBVEXT)'
case "$SHLIBSEXT" in
@@ -1060,9 +1070,11 @@ else
SHLIBVEXT=.so.v-nobuild
SHLIBSEXT=.so.s-nobuild
fi],
- RUN_ENV=
+[ RUN_ENV=
CC_LINK="$CC_LINK_STATIC"
-)dnl
+ SHLIBEXT=.so-nobuild
+ SHLIBVEXT=.so.v-nobuild
+ SHLIBSEXT=.so.s-nobuild])dnl
if test -z "$LIBLIST"; then
AC_MSG_ERROR([must enable one of shared or static libraries])
@@ -1119,7 +1131,7 @@ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
# Set up architecture-specific variables.
case $krb5_cv_host in
-alpha-dec-osf*)
+alpha*-dec-osf*)
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
@@ -1129,7 +1141,11 @@ alpha-dec-osf*)
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
PROFFLAGS=-pg
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
- CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
+ # Need -oldstyle_liblookup to avoid picking up shared libs from
+ # other builds. OSF/1 / Tru64 ld programs look through the entire
+ # library path for shared libs prior to looking through the
+ # entire library path for static libs.
+ CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) -Wl,-oldstyle_liblookup'
# $(PROG_RPATH) is here to handle things like a shared tcl library
RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`:$(PROG_RPATH):/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH; _RLD_ROOT=/dev/dummy/d; export _RLD_ROOT;'
;;
@@ -1145,13 +1161,22 @@ alpha-dec-osf*)
# (compiled-in or SHLIB_PATH) will be searched first.
#
*-*-hpux*)
- PICFLAGS=+z
+ if test "$krb5_cv_prog_gcc" = yes; then
+ PICFLAGS=-fPIC
+ else
+ PICFLAGS=+z
+ fi
INSTALL_SHLIB='$(INSTALL)'
SHLIBEXT=.sl
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.$(LIBMAJOR)'
- SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='ld -b +h lib$(LIB)$(SHLIBSEXT)'
+ if test "$krb5_cv_prog_gcc" = yes; then
+ SHLIB_EXPFLAGS='-Wl,+s -Wl,+b,$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIB)$(SHLIBSEXT)'
+ else
+ SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ LDCOMBINE='ld -b +h lib$(LIB)$(SHLIBSEXT)'
+ fi
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s -Wl,+b,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
@@ -1173,7 +1198,15 @@ mips-sgi-irix6.3) # This is a Kludge; see below
PROFFLAGS=-p
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
- RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ # This grossness is necessary due to the presence of *three*
+ # supported ABIs on Irix, and the precedence of the rpath over
+ # LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
+ # work around this lossage.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ dummy=/dev/dummmy/d
+ # Set the N32 and 64 variables first because the unqualified
+ # variables affect all three and can cause the sed command to fail.
+ RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
;;
mips-sgi-irix*)
@@ -1187,7 +1220,15 @@ mips-sgi-irix*)
PROFFLAGS=-p
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
- RUN_ENV='LD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export LD_LIBRARY_PATH;'
+ # This grossness is necessary due to the presence of *three*
+ # supported ABIs on Irix, and the precedence of the rpath over
+ # LD_LIBRARY*_PATH. Like OSF/1, _RLD*_ROOT needs to be set to
+ # work around this lossage.
+ add='`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`'
+ dummy=/dev/dummmy/d
+ # Set the N32 and 64 variables first because the unqualified
+ # variables affect all three and can cause the sed command to fail.
+ RUN_ENV="LD_LIBRARYN32_PATH=$add:/usr/lib32:/usr/lib32/internal:/lib32:/opt/lib32; export LD_LIBRARYN32_PATH; _RLDN32_ROOT=$dummy; export _RLDN32_ROOT; LD_LIBRARY64_PATH=$add:/usr/lib64:/usr/lib64/internal:/lib64:/opt/lib64; export LD_LIBRARY64_PATH; _RLD64_ROOT=$dummy; export _RLD64_ROOT; LD_LIBRARY_PATH=$add:/usr/lib:/usr/lib/internal:/lib:/lib/cmplrs/cc:/usr/lib/cmplrs/cc:/opt/lib; export LD_LIBRARY_PATH; _RLD_ROOT=$dummy; export _RLD_ROOT;"
;;
# untested...
@@ -1243,7 +1284,7 @@ mips-*-netbsd*)
PICFLAGS=-fpic
if test "x$objformat" = "xelf" ; then
SHLIBVEXT='.so.$(LIBMAJOR)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,-R$(PROG_RPATH)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
else
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
@@ -1324,7 +1365,7 @@ mips-*-netbsd*)
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
LDCOMBINE='ld -shared -h lib$(LIB)$(SHLIBSEXT)'
- SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS) -lc'
PROFFLAGS=-pg
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,-rpath -Wl,$(PROG_RPATH)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH)'
@@ -1396,7 +1437,8 @@ AC_DEFUN(AC_LIBRARY_NET, [
# ugliness is necessary:
AC_CHECK_LIB(socket, gethostbyname,
LIBS="-lsocket -lnsl $LIBS",
- AC_CHECK_LIB(resolv, gethostbyname),
+ AC_CHECK_LIB(resolv, gethostbyname,
+ LIBS="-lresolv $LIBS" ; RESOLV_LIB=-lresolv),
-lnsl)
)
)
@@ -1406,20 +1448,61 @@ AC_DEFUN(AC_LIBRARY_NET, [
KRB5_AC_ENABLE_DNS
if test "$enable_dns" = yes ; then
AC_CHECK_FUNC(res_search, , AC_CHECK_LIB(resolv, res_search,
- LIBS="$LIBS -lresolv",
+ LIBS="$LIBS -lresolv" ; RESOLV_LIB=-lresolv,
AC_ERROR(Cannot find resolver support routine res_search in -lresolv.)
))
fi
+ AC_SUBST(RESOLV_LIB)
])
dnl
dnl
dnl KRB5_AC_ENABLE_DNS
dnl
AC_DEFUN(KRB5_AC_ENABLE_DNS, [
+AC_MSG_CHECKING(if DNS Kerberos lookup support should be compiled in)
+
AC_ARG_ENABLE([dns],
-[ --enable-dns enable DNS lookups of Kerberos realm and servers], ,
-[enable_dns=no])
- if test "$enable_dns" = yes; then
+[ --enable-dns build in support for Kerberos-related DNS lookups], ,
+[enable_dns=default])
+
+ AC_ARG_ENABLE([dns-for-kdc],
+[ --enable-dns-for-kdc enable DNS lookups of Kerberos KDCs (default=YES)], ,
+[case "$enable_dns" in
+ yes | no) enable_dns_for_kdc=$enable_dns ;;
+ *) enable_dns_for_kdc=yes ;;
+esac])
+ if test "$enable_dns_for_kdc" = yes; then
+ AC_DEFINE(KRB5_DNS_LOOKUP_KDC)
+ fi
+
+ AC_ARG_ENABLE([dns-for-realm],
+[ --enable-dns-for-realm enable DNS lookups of Kerberos realm names], ,
+[case "$enable_dns" in
+ yes | no) enable_dns_for_realm=$enable_dns ;;
+ *) enable_dns_for_realm=no ;;
+esac])
+ if test "$enable_dns_for_realm" = yes; then
+ AC_DEFINE(KRB5_DNS_LOOKUP_REALM)
+ fi
+
+ if test "$enable_dns_for_kdc,$enable_dns_for_realm" != no,no
+ then
+ # must compile in the support code
+ if test "$enable_dns" = no ; then
+ AC_MSG_ERROR(cannot both enable some DNS options and disable DNS support)
+ fi
+ enable_dns=yes
+ fi
+ if test "$enable_dns" = yes ; then
AC_DEFINE(KRB5_DNS_LOOKUP)
+ else
+ enable_dns=no
fi
+
+AC_MSG_RESULT($enable_dns)
+dnl AC_MSG_CHECKING(if DNS should be used to find KDCs by default)
+dnl AC_MSG_RESULT($enable_dns_for_kdc)
+dnl AC_MSG_CHECKING(if DNS should be used to find realm name by default)
+dnl AC_MSG_RESULT($enable_dns_for_realm)
+
])