git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
67845d3
)
libreplace: export LIBREPLACE_NETWORK_OBJS and LIBREPLACE_NETWORK_LIBS vars
author
Stefan Metzmacher
<metze@samba.org>
Thu, 8 May 2008 08:32:19 +0000
(10:32 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Tue, 13 May 2008 07:07:13 +0000
(09:07 +0200)
metze
source/lib/replace/libreplace_network.m4
patch
|
blob
|
history
diff --git
a/source/lib/replace/libreplace_network.m4
b/source/lib/replace/libreplace_network.m4
index 6d10313e4786b734fff621b6894df7c00e5e43c9..f1657d9f796d11ac0878ddb705a74b7eb4759a27 100644
(file)
--- a/
source/lib/replace/libreplace_network.m4
+++ b/
source/lib/replace/libreplace_network.m4
@@
-2,6
+2,9
@@
AC_DEFUN_ONCE(AC_LIBREPLACE_NETWORK_CHECKS,
[
echo "LIBREPLACE_NETWORK_CHECKS: START"
[
echo "LIBREPLACE_NETWORK_CHECKS: START"
+LIBREPLACE_NETWORK_OBJS=""
+LIBREPLACE_NETWORK_LIBS=""
+
AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h)
AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h)
@@
-98,7
+101,13
@@
if test x"$ac_cv_func_gethostbyname" = x"no"; then
fi
fi
fi
fi
-AC_CHECK_FUNCS(socketpair,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} socketpair.o"])
+# The following tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
+old_LIBS=$LIBS
+LIBS="${LIBREPLACE_NETWORK_LIBS}"
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS -I$libreplacedir"
+
+AC_CHECK_FUNCS(socketpair,[],[LIBREPLACE_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS} socketpair.o"])
AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[
AC_TRY_RUN([
@@
-118,14
+127,14
@@
exit(1);}],
AC_CHECK_FUNCS(inet_ntoa,[],[libreplace_cv_REPLACE_INET_NTOA=yes])
if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
AC_CHECK_FUNCS(inet_ntoa,[],[libreplace_cv_REPLACE_INET_NTOA=yes])
if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
- LIBREPLACE
OBJ="${LIBREPLACEOBJ
} inet_ntoa.o"
+ LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} inet_ntoa.o"
fi
fi
-AC_CHECK_FUNCS(inet_aton,[],[LIBREPLACE
OBJ="${LIBREPLACEOBJ
} inet_aton.o"])
+AC_CHECK_FUNCS(inet_aton,[],[LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} inet_aton.o"])
-AC_CHECK_FUNCS(inet_ntop,[],[LIBREPLACE
OBJ="${LIBREPLACEOBJ
} inet_ntop.o"])
+AC_CHECK_FUNCS(inet_ntop,[],[LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} inet_ntop.o"])
-AC_CHECK_FUNCS(inet_pton,[],[LIBREPLACE
OBJ="${LIBREPLACEOBJ
} inet_pton.o"])
+AC_CHECK_FUNCS(inet_pton,[],[LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} inet_pton.o"])
dnl test for getaddrinfo/getnameinfo
AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[
dnl test for getaddrinfo/getnameinfo
AC_CACHE_CHECK([for getaddrinfo],libreplace_cv_HAVE_GETADDRINFO,[
@@
-157,7
+166,7
@@
if test x"$libreplace_cv_HAVE_GETADDRINFO" = x"yes"; then
AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo])
AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
else
AC_DEFINE(HAVE_FREEADDRINFO,1,[Whether the system has freeaddrinfo])
AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether the system has gai_strerror])
else
- LIBREPLACE
OBJ="${LIBREPLACEOBJ
} getaddrinfo.o"
+ LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} getaddrinfo.o"
fi
AC_CHECK_HEADERS([ifaddrs.h])
fi
AC_CHECK_HEADERS([ifaddrs.h])
@@
-193,16
+202,6
@@
if test x"$libreplace_cv_HAVE_GETIFADDRS" = x"yes"; then
AC_DEFINE(HAVE_STRUCT_IFADDRS,1,[Whether struct ifaddrs is available])
fi
AC_DEFINE(HAVE_STRUCT_IFADDRS,1,[Whether struct ifaddrs is available])
fi
-##################
-# look for a method of finding the list of network interfaces
-#
-# This tests need LIBS="${LIBREPLACE_NETWORK_LIBS}"
-#
-old_LIBS=$LIBS
-LIBS="${LIBREPLACE_NETWORK_LIBS}"
-SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I$libreplacedir"
-iface=no;
##################
# look for a method of finding the list of network interfaces
iface=no;
##################
# look for a method of finding the list of network interfaces
iface=no;
@@
-222,7
+221,7
@@
AC_TRY_RUN([
if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available])
else
if test x"$libreplace_cv_HAVE_IFACE_GETIFADDRS" = x"yes"; then
iface=yes;AC_DEFINE(HAVE_IFACE_GETIFADDRS,1,[Whether iface getifaddrs is available])
else
- LIBREPLACE
OBJ="${LIBREPLACEOBJ
} getifaddrs.o"
+ LIBREPLACE
_NETWORK_OBJS="${LIBREPLACE_NETWORK_OBJS
} getifaddrs.o"
fi
fi
@@
-288,5
+287,7
@@
fi
LIBS=$old_LIBS
CPPFLAGS="$SAVE_CPPFLAGS"
LIBS=$old_LIBS
CPPFLAGS="$SAVE_CPPFLAGS"
+LIBREPLACEOBJ="${LIBREPLACEOBJ} ${LIBREPLACE_NETWORK_OBJS}"
+
echo "LIBREPLACE_NETWORK_CHECKS: END"
]) dnl end AC_LIBREPLACE_NETWORK_CHECKS
echo "LIBREPLACE_NETWORK_CHECKS: END"
]) dnl end AC_LIBREPLACE_NETWORK_CHECKS