summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/config.m414
-rw-r--r--source4/heimdal_build/config.mk13
2 files changed, 23 insertions, 4 deletions
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
index fa79849750..506acfdfe1 100644
--- a/source4/heimdal_build/config.m4
+++ b/source4/heimdal_build/config.m4
@@ -64,7 +64,6 @@ AC_CHECK_FUNCS([ \
inet_aton \
gethostname \
getnameinfo \
- gai_strerror \
iruserok \
putenv \
rcmd \
@@ -91,7 +90,6 @@ AC_CHECK_FUNCS([ \
flock \
getaddrinfo \
freeaddrinfo \
- gai_strerror \
writev
])
@@ -204,3 +202,15 @@ SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_ADDRINFO, NO)
if test t$ac_cv_func_getaddrinfo != tyes; then
SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_ADDRINFO, YES)
fi
+
+# only add gai_strerror if needed
+SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, NO)
+AC_CHECK_FUNC(gai_strerror)
+if test t$ac_cv_func_gai_strerror != tyes; then
+ AC_SEARCH_LIBS_EXT(gai_strerror, [xnet], XNET_LIBS)
+ AC_CHECK_FUNC_EXT(gai_strerror, $XNET_LIBS)
+ if test t$ac_cv_func_gai_strerror != tyes; then
+ SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, YES)
+ fi
+fi
+SMB_EXT_LIB(XNET,[${XNET_LIBS}],[${XNET_CFLAGS}],[${XNET_CPPFLAGS}],[${XNET_LDFLAGS}])
diff --git a/source4/heimdal_build/config.mk b/source4/heimdal_build/config.mk
index 1afa3eaab6..25c872872d 100644
--- a/source4/heimdal_build/config.mk
+++ b/source4/heimdal_build/config.mk
@@ -261,10 +261,15 @@ NOPROTO = YES
#######################
#######################
+# Start SUBSYSTEM HEIMDAL_ROKEN_GAI_STRERROR
+[SUBSYSTEM::HEIMDAL_ROKEN_GAI_STRERROR]
+ADD_OBJ_FILES = heimdal/lib/roken/gai_strerror.o
+NOPROTO = YES
+
+#######################
# Start SUBSYSTEM HEIMDAL_ROKEN_ADDRINFO
[SUBSYSTEM::HEIMDAL_ROKEN_ADDRINFO]
ADD_OBJ_FILES = \
- heimdal/lib/roken/gai_strerror.o \
heimdal/lib/roken/getaddrinfo.o \
heimdal/lib/roken/freeaddrinfo.o \
heimdal/lib/roken/getipnodebyaddr.o \
@@ -297,7 +302,11 @@ ADD_OBJ_FILES = \
heimdal/lib/roken/strupr.o \
heimdal/lib/roken/strpool.o \
heimdal_build/replace.o
-REQUIRED_SUBSYSTEMS = HEIMDAL_ROKEN_ADDRINFO EXT_LIB_SOCKET
+REQUIRED_SUBSYSTEMS = \
+ HEIMDAL_ROKEN_ADDRINFO \
+ HEIMDAL_ROKEN_GAI_STRERROR \
+ EXT_LIB_SOCKET \
+ EXT_LIB_XNET
NOPROTO = YES
# End SUBSYSTEM HEIMDAL_ROKEN
#######################