summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-05-08 11:01:09 +0200
committerStefan Metzmacher <metze@samba.org>2008-05-16 08:51:53 +0200
commita4cb989e4897118aaf306bf87d6716a233886972 (patch)
tree6da836931c675deb4166b7a4e29dfca99e01f38f
parent107ed5fe0c51abeb4def8f8e2cc041b3f16061ad (diff)
downloadsamba-a4cb989e4897118aaf306bf87d6716a233886972.tar.gz
samba-a4cb989e4897118aaf306bf87d6716a233886972.tar.bz2
samba-a4cb989e4897118aaf306bf87d6716a233886972.zip
libreplace: try to fix the build on HP-UX which has if_nametoindex() in -lipv6
metze (cherry picked from commit da2179ee5d5b6094ab63a9d9d6a8d59893937087) (This used to be commit 151d62da1321322615daadabb41d049974f5fe6a)
-rw-r--r--source3/lib/replace/libreplace_network.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/replace/libreplace_network.m4 b/source3/lib/replace/libreplace_network.m4
index 56c603a155..5ab71f160a 100644
--- a/source3/lib/replace/libreplace_network.m4
+++ b/source3/lib/replace/libreplace_network.m4
@@ -102,6 +102,19 @@ if test x"$ac_cv_func_gethostbyname" = x"no"; then
fi
fi
+dnl HP-UX has if_nametoindex in -lipv6
+AC_CHECK_FUNCS(if_nametoindex)
+if test x"$ac_cv_func_if_nametoindex" = x"no"; then
+ AC_CHECK_LIB_EXT(ipv6, LIBREPLACE_NETWORK_LIBS, if_nametoindex)
+ dnl We can't just call AC_CHECK_FUNCS(if_nametoindex) here,
+ dnl because the value has been cached.
+ if test x"$ac_cv_lib_ext_ipv6_if_nametoindex" = x"yes"
+ then
+ AC_DEFINE(HAVE_IF_NAMETOINDEX, 1,
+ [Whether the system has if_nametoindex()])
+ fi
+fi
+
# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
old_LIBS=$LIBS
LIBS="${LIBREPLACE_NETWORK_LIBS}"