[ds6-devel] nc6/config in6_guess_stack.m4,1.3,1.4

chris@deepspace6.net chris@deepspace6.net
Wed Jan 1 23:39:23 2003


Update of /cvs/nc6/config

Modified Files:
	in6_guess_stack.m4 
Log Message:
Cleaned this up because the old version was just aweful and now I've added
caching.  The only serious difference is that the first argument to the macro
is now optional and is passed by value - not by reference (goodness knows why
it was before).

Can people please test this on some of the different ipv6 stacks, such as
usagi, just to make sure I haven't stuffed up?  I've tested on Darwin
(guesses unknown ok) and Linux (guesses linux ok) - so I think I got it right.


Index: in6_guess_stack.m4
===================================================================
RCS file: /cvs/nc6/config/in6_guess_stack.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- in6_guess_stack.m4	20 Dec 2002 00:27:46 -0000	1.3
+++ in6_guess_stack.m4	1 Jan 2003 23:39:21 -0000	1.4
@@ -2,175 +2,186 @@
 dnl IN6_GUESS_STACK(ipv6,ipv6libdir,ipv6lib,CFLAGS,LIBS)
 dnl ====================================================
 AC_DEFUN(IN6_GUESS_STACK,[
-	inet6_ipv6libdir=
-	inet6_ipv6lib="none"
-	inet6_ipv6type="unknown"
 	AC_MSG_CHECKING([IPv6 stack type])
+	AC_CACHE_VAL([usagi_cv_ipv6_stack],[
+	usagi_cv_ipv6_stack=unknown
 	for inet6_i in inria kame usagi linux linux_inet6 toshiba v6d zeta solaris7; do
 		case ${inet6_i} in
 		inria)	
 			dnl http://www.kame.net/
-			eval inet6_ipv6_${inet6_i}=${inet6_i}
-			eval inet6_cflags_${inet6_i}=
 			AC_EGREP_CPP(%%%yes%%%, [
 #include <netinet/in.h>
 #ifdef IPV6_INRIA_VERSION
 %%%yes%%%
 #endif],
-				[if test "$inet6_ipv6type" = "unknown"; then
-					inet6_ipv6type=${inet6_i}
-				fi])
+			[if test "X$usagi_cv_ipv6_stack" = "Xunknown"; then
+				usagi_cv_ipv6_stack=${inet6_i}
+			fi])
 			;;
 		kame)	
 			dnl http://www.kame.net/
-			eval inet6_ipv6_${inet6_i}=${inet6_i}
-			eval inet6_cflags_${inet6_i}=
 			AC_EGREP_CPP(%%%yes%%%, [
 #include <netinet/in.h>
 #ifdef __KAME__
 %%%yes%%%
 #endif],
-			[if test -f /usr/local/v6/lib/libinet6.a; then
-				eval inet6_ipv6lib_${inet6_i}=inet6
-				eval inet6_ipv6libdir_${inet6_i}=/usr/local/v6/lib
-			fi
-			if test "$inet6_ipv6type" = "unknown"; then
-				inet6_ipv6type=${inet6_i}
+			[if test "X$usagi_cv_ipv6_stack" = "Xunknown"; then
+				usagi_cv_ipv6_stack=${inet6_i}
 			fi])
 			;;
 		usagi)
 			dnl http://www.linux-ipv6.org/
-			eval inet6_ipv6_${inet6_i}=${inet6_i}
-			eval inet6_cflags_${inet6_i}=
 			AC_EGREP_CPP(%%%yes%%%, [
 #include <netinet/in.h>
 #ifdef __USAGI__
 %%%yes%%%
 #endif],
-			[if test -f /usr/local/v6/lib/libinet6.a; then
-				eval inet6_ipv6lib_${inet6_i}=inet6
-				eval inet6_ipv6libdir_${inet6_i}=/usr/local/v6/lib
-			fi
-			if test "$inet6_ipv6type" = "unknown"; then
-				inet6_ipv6type=${inet6_i}
+			[if test "X$usagi_cv_ipv6_stack" = "Xunknown"; then
+				usagi_cv_ipv6_stack=${inet6_i}
 			fi])
 			;;
 		linux)	
 			dnl http://www.v6.linux.or.jp/
-			eval inet6_ipv6_${inet6_i}=${inet6_i}
-			eval inet6_cflags_${inet6_i}=
 			AC_EGREP_CPP(%%%yes%%%, [
 #include <features.h>
 #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
 %%%yes%%%
 #endif],
-			[if test "$inet6_ipv6type" = "unknown"; then
-				inet6_ipv6type=${inet6_i}
+			[if test "X$usagi_cv_ipv6_stack" = "Xunknown"; then
+				usagi_cv_ipv6_stack=${inet6_i}
 			fi])
 			;;
 		linux_inet6)
-			eval inet6_ipv6_${inet6_i}=${inet6_i}
-			eval inet6_ipv6lib_${inet6_i}=inet6
-			eval inet6_ipv6libdir_${inet6_i}=/usr/inet6/lib
-			eval inet6_cflags_${inet6_i}=-I/usr/inet6/include
 			dnl http://www.v6.linux.or.jp/
 			if test -d /usr/inet6; then
-				if test "$inet6_ipv6type" = "unknown"; then
-					inet6_ipv6type=${inet6_i}
+				if test "X$usagi_cv_ipv6_stack" = "Xunknown"; then
+					usagi_cv_ipv6_stack=${inet6_i}
[...181 lines suppressed...]



More information about the ds6-devel mailing list