Browse Source

2008-04-24 Zoltan Varga <[email protected]>

	* configure.in: Use the three argument form of AC_DEFINE everywhere since it is
	required by autoheader for parameters not in acconfig.h.

	* acconfig.h: Removed, all the parameters are defined in configure.in now.

svn path=/trunk/mono/; revision=101737
Zoltan Varga 17 years ago
parent
commit
55b50c1384
3 changed files with 45 additions and 78 deletions
  1. 7 0
      ChangeLog
  2. 0 40
      acconfig.h
  3. 38 38
      configure.in

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2008-04-24  Zoltan Varga  <[email protected]>
+
+	* configure.in: Use the three argument form of AC_DEFINE everywhere since it is
+	required by autoheader for parameters not in acconfig.h.
+
+	* acconfig.h: Removed, all the parameters are defined in configure.in now.
+
 2008-04-24  Rodrigo Kumpera  <[email protected]>
 
 	* runtime/Makefile.am (mcs-compileall): Turn on the verifier.

+ 0 - 40
acconfig.h

@@ -1,40 +0,0 @@
-#undef HAVE_INET_PTON
-#undef HAVE_INET_ATON
-#undef HAVE_MSG_NOSIGNAL
-#undef HAVE_SOL_IP
-#undef HAVE_SOL_TCP
-#undef HAVE_SOL_IPV6
-#undef HAVE_IP_PKTINFO
-#undef HAVE_IPV6_PKTINFO
-#undef HAVE_IP_DONTFRAGMENT
-#undef HAVE_IP_MTU_DISCOVER
-#undef HAVE_STRUCT_IP_MREQN
-#undef HAVE_STRUCT_IP_MREQ
-#undef HAVE_PTHREAD_MUTEX_TIMEDLOCK
-#undef USE_MONO_MUTEX
-#undef HAVE_LARGE_FILE_SUPPORT
-#undef HAVE_NEW_ICONV
-#undef NAME_DEV_RANDOM
-#undef HAVE_CRYPT_RNG
-#undef HAVE_BOEHM_GC
-#undef USE_INCLUDED_LIBGC
-#undef DISABLE_SHARED_HANDLES
-#undef HAVE_TIMEZONE
-#undef HAVE_TM_GMTOFF
-#undef MONO_SIZEOF_SUNPATH
-#undef MONO_ZERO_ARRAY_LENGTH
-#undef PTHREAD_POINTER_ID
-#undef HAVE_GC_H
-#undef HAVE_GC_GCJ_MALLOC
-#undef HAVE_GC_ENABLE
-#undef WITH_BUNDLE
-#undef HAVE_GETHOSTBYNAME2_R
-#undef HAVE_ICU
-#undef HAVE_KW_THREAD
-#undef HAVE_SIGNBIT
-#undef USE_MACH_SEMA
-#undef HAVE_SOCKLEN_T
-#undef HAVE_TRUNCL
-#undef HAVE_AINTL
-#undef HAVE_SCANDIR
-#undef HAVE_WORKING_SIGALTSTACK

+ 38 - 38
configure.in

@@ -114,7 +114,7 @@ case "$host" in
 		fi
 		CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD4"
 		need_link_unlink=yes
-		AC_DEFINE(PTHREAD_POINTER_ID)
+		AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread_t is a pointer])
 		libdl=
 		libgc_threads=pthreads
 # TLS isn't implemented at all on 4-STABLE
@@ -229,7 +229,7 @@ case "$host" in
 		libmono_ldflags="-pthread"
 		need_link_unlink=yes
 		AC_DEFINE(PTHREAD_POINTER_ID)
-		AC_DEFINE(USE_MACH_SEMA)
+		AC_DEFINE(USE_MACH_SEMA, 1, [...])
 		no_version_script=yes
 		libdl=
 		libgc_threads=pthreads
@@ -645,7 +645,7 @@ case "x$gc" in
 			AC_MSG_ERROR("GC requested but header files not found! You may need to install them by hand.")
 		fi
 
-		AC_DEFINE(HAVE_BOEHM_GC)
+		AC_DEFINE(HAVE_BOEHM_GC, 1, [Have Boehm GC])
 		AC_SUBST(HAVE_BOEHM_GC)
 		LIBGC_LIBS="-lgc $libdl"
 		LIBGC_STATIC_LIBS="$LIBGC_LIBS"
@@ -653,14 +653,14 @@ case "x$gc" in
 		# AC_CHECK_FUNCS does not work for some reason...
 		AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
 		if test "x$found_gcj_malloc" = "xyes"; then
-			AC_DEFINE(HAVE_GC_GCJ_MALLOC)
+			AC_DEFINE(HAVE_GC_GCJ_MALLOC, 1, [Have GC_gcj_malloc])
 			AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (with typed GC)", [GC description])
 		else
 			AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (no typed GC)", [GC description])
 		fi
 		AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
 		if test "x$found_gc_enable" = "xyes"; then
-			AC_DEFINE(HAVE_GC_ENABLE)
+			AC_DEFINE(HAVE_GC_ENABLE, 1, [Have 'GC_enable'])
 		fi
 		;;
 
@@ -674,15 +674,15 @@ case "x$gc" in
 		LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
 		LIBGC_STATIC_LIBS='$(top_builddir)/libgc/libmonogc-static.la'
 
-		AC_DEFINE(HAVE_BOEHM_GC)
+		AC_DEFINE(HAVE_BOEHM_GC, 1, [Have Boehm GC])
 		AC_SUBST(HAVE_BOEHM_GC)
 
-		AC_DEFINE(HAVE_GC_H)
-		AC_DEFINE(USE_INCLUDED_LIBGC)
+		AC_DEFINE(HAVE_GC_H, 1, [Have gc.h])
+		AC_DEFINE(USE_INCLUDED_LIBGC, 1, [Use included libgc])
 
 		# The included libgc contains GCJ support
-		AC_DEFINE(HAVE_GC_GCJ_MALLOC)
-		AC_DEFINE(HAVE_GC_ENABLE)
+		AC_DEFINE(HAVE_GC_GCJ_MALLOC, 1, [Have GC_gcj_malloc])
+		AC_DEFINE(HAVE_GC_ENABLE, 1, [Have GC_enable])
 		AC_DEFINE_UNQUOTED(USED_GC_NAME, "Included Boehm (with typed GC)", [GC description])
 		;;
 
@@ -822,7 +822,7 @@ if test x$platform_win32 = xno; then
 			}
 		], [
 			AC_MSG_RESULT(ok)
-			AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
+			AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
 			large_CPPFLAGS="$large_CPPFLAGS $1"
 			large_offt=yes
 		], [
@@ -855,7 +855,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_MSG_NOSIGNAL)
+		AC_DEFINE(HAVE_MSG_NOSIGNAL, 1, [Have MSG_NOSIGNAL])
 	], [
 		# We'll have to use signals
 		AC_MSG_RESULT(no)
@@ -870,7 +870,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_SOL_IP)
+		AC_DEFINE(HAVE_SOL_IP, 1, [Have SOL_IP])
 	], [
 		# We'll have to use getprotobyname
 		AC_MSG_RESULT(no)
@@ -885,7 +885,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_SOL_IPV6)
+		AC_DEFINE(HAVE_SOL_IPV6, 1, [Have SOL_IPV6])
 	], [
 		# We'll have to use getprotobyname
 		AC_MSG_RESULT(no)
@@ -900,7 +900,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_SOL_TCP)
+		AC_DEFINE(HAVE_SOL_TCP, 1, [Have SOL_TCP])
 	], [
 		# We'll have to use getprotobyname
 		AC_MSG_RESULT(no)
@@ -915,7 +915,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_IP_PKTINFO)
+		AC_DEFINE(HAVE_IP_PKTINFO, 1, [Have IP_PKTINFO])
 	], [
 		AC_MSG_RESULT(no)
 	])
@@ -929,7 +929,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_IPV6_PKTINFO)
+		AC_DEFINE(HAVE_IPV6_PKTINFO, 1, [Have IPV6_PKTINFO])
 	], [
 		AC_MSG_RESULT(no)
 	])
@@ -943,7 +943,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_IP_DONTFRAGMENT)
+		AC_DEFINE(HAVE_IP_DONTFRAGMENT, 1, [Have IP_DONTFRAGMENT])
 	], [
 		AC_MSG_RESULT(no)
 	])
@@ -957,7 +957,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_IP_MTU_DISCOVER)
+		AC_DEFINE(HAVE_IP_MTU_DISCOVER, 1, [Have IP_MTU_DISCOVER])
 	], [
 		AC_MSG_RESULT(no)
 	])
@@ -972,7 +972,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_STRUCT_IP_MREQN)
+		AC_DEFINE(HAVE_STRUCT_IP_MREQN, 1, [Have struct ip_mreqn])
 	], [
 		# We'll just have to try and use struct ip_mreq
 		AC_MSG_RESULT(no)
@@ -983,7 +983,7 @@ if test x$platform_win32 = xno; then
 		], [
 			# Yes, we have it...
 			AC_MSG_RESULT(yes)
-			AC_DEFINE(HAVE_STRUCT_IP_MREQ)
+			AC_DEFINE(HAVE_STRUCT_IP_MREQ, 1, [Have struct ip_mreq])
 		], [
 			# No multicast support
 			AC_MSG_RESULT(no)
@@ -999,7 +999,7 @@ if test x$platform_win32 = xno; then
 	], [
 		# Yes, we have it...
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_GETHOSTBYNAME2_R)
+		AC_DEFINE(HAVE_GETHOSTBYNAME2_R, 1, [Have gethostbyname2_r])
 	], [
 		AC_MSG_RESULT(no)
 	])
@@ -1033,7 +1033,7 @@ if test x$platform_win32 = xno; then
 		   cv_mono_sizeof_sunpath=0,
 		   cv_mono_sizeof_sunpath=0)])dnl
 	AC_MSG_RESULT($cv_mono_sizeof_sunpath)
-	AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath)
+	AC_DEFINE_UNQUOTED(MONO_SIZEOF_SUNPATH, $cv_mono_sizeof_sunpath, [Sizeof sock_un.sun_path])
 
 	dnl *************************************
 	dnl *** Checks for zero length arrays ***
@@ -1046,10 +1046,10 @@ if test x$platform_win32 = xno; then
                 };
         ], [], [
 		AC_MSG_RESULT(yes)
-		AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0)
+		AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 0, [Length of zero length arrays])
 	], [
 		AC_MSG_RESULT(no)
-		AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1)
+		AC_DEFINE_UNQUOTED(MONO_ZERO_ARRAY_LENGTH, 1, [Length of zero length arrays])
 	])
 
 	dnl *****************************
@@ -1106,7 +1106,7 @@ if test x$platform_win32 = xno; then
 	], [
 		AC_MSG_RESULT(no)
 		AC_MSG_WARN(Using mono_mutex_t for recursive mutexes)
-		AC_DEFINE(USE_MONO_MUTEX)
+		AC_DEFINE(USE_MONO_MUTEX, 1, [Use mono_mutex_t])
 	])
 	AC_CHECK_FUNCS(pthread_attr_setstacksize)
 	AC_CHECK_FUNCS(pthread_attr_getstack)
@@ -1250,7 +1250,7 @@ if test x$platform_win32 = xno; then
 
 		], [
 				AC_MSG_RESULT(yes)
-				AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
+				AC_DEFINE(HAVE_WORKING_SIGALTSTACK, 1, [Have a working sigaltstack])
 		], [
 				with_sigaltstack=no
 				AC_MSG_RESULT(no)
@@ -1276,7 +1276,7 @@ if test x$platform_win32 = xno; then
 			tm.tm_gmtoff = 1;
 			], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
 	if test $ac_cv_struct_tm_gmtoff = yes; then
-		AC_DEFINE(HAVE_TM_GMTOFF)
+		AC_DEFINE(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff])
 	else
 		AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
 			AC_TRY_COMPILE([
@@ -1285,7 +1285,7 @@ if test x$platform_win32 = xno; then
 				timezone = 1;
 			], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
 		if test $ac_cv_var_timezone = yes; then
-			AC_DEFINE(HAVE_TIMEZONE)
+			AC_DEFINE(HAVE_TIMEZONE, 1, [Have timezone variable])
 		else
 			AC_ERROR(unable to find a way to determine timezone)
 		fi
@@ -1299,13 +1299,13 @@ if test x$platform_win32 = xno; then
 	        AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
 	                AC_TRY_LINK([#include <math.h>], 
 	                [ finite(0.0); ], 
-	                AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
+	                AC_DEFINE(HAVE_FINITE, 1, [Have finite]) AC_MSG_RESULT(yes),
 	                AC_MSG_RESULT(no)))
 	fi
         AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
                 AC_TRY_LINK([#include <math.h>], 
                 [ isfinite(0.0); ], 
-                AC_DEFINE(HAVE_ISFINITE) AC_MSG_RESULT(yes),
+                AC_DEFINE(HAVE_ISFINITE, 1, [Have isfinite]) AC_MSG_RESULT(yes),
                 AC_MSG_RESULT(no)))
 
 	dnl ****************************************************************
@@ -1322,7 +1322,7 @@ if test x$platform_win32 = xno; then
 		int s = signbit(1.0);
 	], [
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_SIGNBIT)
+		AC_DEFINE(HAVE_SIGNBIT, 1, [Have signbit])
 	], [
 		AC_MSG_RESULT(no)
 	]) 
@@ -1529,7 +1529,7 @@ AC_TRY_COMPILE([
   socklen_t foo;
 ],[
 ac_cv_c_socklen_t=yes
-	AC_DEFINE(HAVE_SOCKLEN_T)
+	AC_DEFINE(HAVE_SOCKLEN_T, 1, [Have socklen_t])
 	AC_MSG_RESULT(yes)
 ],[
 	AC_MSG_RESULT(no)
@@ -1559,7 +1559,7 @@ AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
 	AC_MSG_RESULT(no)))
 
 if test "x$ac_cv_truncl" != "xyes"; then
-   AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL) LIBS="$LIBS -lsunmath"])
+   AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL, 1, [Has the 'aintl' function]) LIBS="$LIBS -lsunmath"])
 fi
 
 dnl ****************************
@@ -1590,7 +1590,7 @@ dnl Everywhere else, it's /dev/random
     ;;
 esac
 
-AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM")
+AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random])
 
 dnl Now check if the device actually exists
 
@@ -1599,7 +1599,7 @@ if test "x$try_dev_random" = "xyes"; then
     [if test -r "$NAME_DEV_RANDOM" ; then
         ac_cv_have_dev_random=yes; else ac_cv_have_dev_random=no; fi])
     if test "x$ac_cv_have_dev_random" = "xyes"; then
-        AC_DEFINE(HAVE_CRYPT_RNG)
+        AC_DEFINE(HAVE_CRYPT_RNG, 1, [Have /dev/random])
     fi
 else
     AC_MSG_CHECKING(for random device)
@@ -1632,7 +1632,7 @@ AC_MSG_CHECKING([if inter-process shared handles are requested])
 AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
 AC_MSG_RESULT($try_shared_handles)
 if test "x$try_shared_handles" != "xyes"; then
-	AC_DEFINE(DISABLE_SHARED_HANDLES)
+	AC_DEFINE(DISABLE_SHARED_HANDLES, 1, [Disable inter-process shared handles])
 	AC_SUBST(DISABLE_SHARED_HANDLES)
 fi
 
@@ -1938,7 +1938,7 @@ AC_MSG_RESULT($mono_debugger_supported)
 AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
 
 if test "x$with_tls" = "x__thread"; then
-	AC_DEFINE(HAVE_KW_THREAD)
+	AC_DEFINE(HAVE_KW_THREAD, 1, [Have __thread keyword])
 	# Pass the information to libgc
 	CPPFLAGS="$CPPFLAGS -DUSE_COMPILER_TLS"
 	AC_MSG_CHECKING(if the tls_model attribute is supported)