summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-20 17:51:55 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:57 +1000
commit3207f81787f33da3e25ba8d62ecb923f7aef9861 (patch)
tree2a5cfd847c9bb2805a66f5ad7a4bbeaedf8195d7
parent508cb5b97ec843aff26d60915578b2eb6cc155fc (diff)
downloadsamba-3207f81787f33da3e25ba8d62ecb923f7aef9861.tar.gz
samba-3207f81787f33da3e25ba8d62ecb923f7aef9861.tar.bz2
samba-3207f81787f33da3e25ba8d62ecb923f7aef9861.zip
build: more functions that are in -lsocket -lnsl on some systems
-rw-r--r--lib/replace/wscript11
-rw-r--r--source4/heimdal_build/wscript_configure14
2 files changed, 16 insertions, 9 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 151f3ed85c..de71017b2c 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -158,6 +158,10 @@ def configure(conf):
conf.CHECK_TYPE_IN('sig_atomic_t', 'signal.h', define='HAVE_SIG_ATOMIC_T_TYPE')
+ conf.CHECK_FUNCS_IN('''inet_ntoa inet_aton inet_ntop inet_pton connect gethostbyname
+ getaddrinfo getnameinfo freeaddrinfo gai_strerror''',
+ 'socket nsl', checklibc=True)
+
conf.CHECK_CODE('''
struct sockaddr_storage sa_store;
struct addrinfo *ai = NULL;
@@ -188,16 +192,13 @@ def configure(conf):
conf.CHECK_FUNCS('link readlink symlink realpath fdatasync snprintf vsnprintf')
conf.CHECK_FUNCS('asprintf vasprintf setenv unsetenv strnlen strtoull __strtoull')
conf.CHECK_FUNCS('strtouq strtoll __strtoll strtoq memmem printf memset memcpy')
- conf.CHECK_FUNCS('connect gethostbyname if_nametoindex socketpair')
- conf.CHECK_FUNCS('dirfd getdirentries getdents syslog getaddrinfo freeaddrinfo')
+ conf.CHECK_FUNCS('if_nametoindex socketpair')
+ conf.CHECK_FUNCS('dirfd getdirentries getdents syslog')
conf.CHECK_FUNCS('gai_strerror get_current_dir_name')
conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups setsid')
conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist getpagesize')
conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
-
- conf.CHECK_FUNCS_IN('inet_ntoa inet_aton inet_ntop inet_pton', 'socket nsl', checklibc=True)
-
conf.CHECK_FUNCS_IN('dlopen dlsym dlerror dlclose', 'dl', checklibc=True)
conf.CHECK_FUNCS_IN('poptGetContext', 'popt')
conf.CHECK_FUNCS_IN('res_search', 'resolv', checklibc=True)
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 04d77d6674..83d171cbee 100644
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -11,11 +11,17 @@ conf.CHECK_HEADERS('''crypt.h errno.h inttypes.h netdb.h signal.h sys/bswap.h
conf.CHECK_HEADERS('curses.h term.h termcap.h', add_headers=False)
-conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname inet_aton gethostname getnameinfo
- putenv rcmd readv sendmsg setitimer socket strlwr strncasecmp
+conf.CHECK_FUNCS('''atexit cgetent getprogname setprogname gethostname
+ putenv rcmd readv sendmsg setitimer strlwr strncasecmp
strptime strsep strsep_copy strtok_r strupr swab umask uname unsetenv
- closefrom hstrerror err warn errx warnx flock getipnodebyname
- getipnodebyaddr freehostent writev''')
+ closefrom err warn errx warnx flock writev''')
+
+conf.CHECK_FUNCS_IN('hstrerror', 'resolv socket nsl', checklibc=True)
+conf.CHECK_FUNCS_IN('''getnameinfo sendmsg socket getipnodebyname gethostent gethostent_r
+ sethostent endhostent getipnodebyaddr freehostent gethostbyname
+ gethostbyname_r gethostbyaddr''',
+ 'socket nsl',
+ checklibc=True)
conf.CHECK_FUNCS('iruserok', checklink=True)