[Opendnssec-commits] [keihatsu.kirei.se/svn/dnssec] r5294 - in trunk: OpenDNSSEC/m4 hsmbully/m4 pkcs11-testing/m4 softHSM softHSM/m4 utils/m4

Rickard Bellgrim rickard at opendnssec.org
Wed Jul 6 11:55:57 CEST 2011


Author: rb
Date: 2011-07-06 11:55:57 +0200 (Wed, 06 Jul 2011)
New Revision: 5294

Modified:
   trunk/OpenDNSSEC/m4/acx_dlopen.m4
   trunk/hsmbully/m4/acx_dlopen.m4
   trunk/pkcs11-testing/m4/acx_dlopen.m4
   trunk/softHSM/NEWS
   trunk/softHSM/m4/acx_dlopen.m4
   trunk/utils/m4/acx_dlopen.m4
Log:
Detect LoadLibrary on Windows.


Modified: trunk/OpenDNSSEC/m4/acx_dlopen.m4
===================================================================
--- trunk/OpenDNSSEC/m4/acx_dlopen.m4	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/OpenDNSSEC/m4/acx_dlopen.m4	2011-07-06 09:55:57 UTC (rev 5294)
@@ -1,17 +1,45 @@
 # $Id$
 
 AC_DEFUN([ACX_DLOPEN],[
-  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
-  [
-    AC_CHECK_LIB([dl],[dlopen], 
-      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
-      LIBS="$LIBS -ldl"],
-      [AC_CHECK_FUNC(LoadLibrary, 
-        [if test $ac_cv_func_LoadLibrary = yes; then
-          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
-        fi
-        ], [AC_MSG_ERROR(No dynamic library loading support)]
-      )]
-    )
-  ])
+	tmp_SUCCESS="no"
+
+	# Unix
+	AC_CHECK_FUNC(
+		[dlopen],
+		[
+			AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+			tmp_SUCCESS="yes"
+		],
+		[
+			AC_CHECK_LIB(
+				[dl],
+				[dlopen],
+				[
+					AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+					LIBS="$LIBS -ldl"
+					tmp_SUCCESS="yes"
+				]
+			)
+		]
+	)
+
+	# Windows
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_CHECKING([for LoadLibrary])
+		AC_TRY_LINK(
+			[#include <windows.h>],
+			[LoadLibrary(NULL);],
+			[
+				AC_DEFINE(HAVE_LOADLIBRARY, 1, [Define if you have LoadLibrary])
+				tmp_SUCCESS="yes"
+			]
+		)
+		AC_MSG_RESULT([$tmp_SUCCESS])
+	fi
+
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_ERROR([No dynamic library loading support])
+	fi
 ])

Modified: trunk/hsmbully/m4/acx_dlopen.m4
===================================================================
--- trunk/hsmbully/m4/acx_dlopen.m4	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/hsmbully/m4/acx_dlopen.m4	2011-07-06 09:55:57 UTC (rev 5294)
@@ -1,17 +1,45 @@
 # $Id: acx_dlopen.m4 1339 2009-07-21 14:05:51Z jelte $
 
 AC_DEFUN([ACX_DLOPEN],[
-  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
-  [
-    AC_CHECK_LIB([dl],[dlopen], 
-      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
-      LIBS="$LIBS -ldl"],
-      [AC_CHECK_FUNC(LoadLibrary, 
-        [if test $ac_cv_func_LoadLibrary = yes; then
-          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
-        fi
-        ], [AC_MSG_ERROR(No dynamic library loading support)]
-      )]
-    )
-  ])
+	tmp_SUCCESS="no"
+
+	# Unix
+	AC_CHECK_FUNC(
+		[dlopen],
+		[
+			AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+			tmp_SUCCESS="yes"
+		],
+		[
+			AC_CHECK_LIB(
+				[dl],
+				[dlopen],
+				[
+					AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+					LIBS="$LIBS -ldl"
+					tmp_SUCCESS="yes"
+				]
+			)
+		]
+	)
+
+	# Windows
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_CHECKING([for LoadLibrary])
+		AC_TRY_LINK(
+			[#include <windows.h>],
+			[LoadLibrary(NULL);],
+			[
+				AC_DEFINE(HAVE_LOADLIBRARY, 1, [Define if you have LoadLibrary])
+				tmp_SUCCESS="yes"
+			]
+		)
+		AC_MSG_RESULT([$tmp_SUCCESS])
+	fi
+
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_ERROR([No dynamic library loading support])
+	fi
 ])

Modified: trunk/pkcs11-testing/m4/acx_dlopen.m4
===================================================================
--- trunk/pkcs11-testing/m4/acx_dlopen.m4	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/pkcs11-testing/m4/acx_dlopen.m4	2011-07-06 09:55:57 UTC (rev 5294)
@@ -1,17 +1,45 @@
 # $Id$
 
 AC_DEFUN([ACX_DLOPEN],[
-  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
-  [
-    AC_CHECK_LIB([dl],[dlopen], 
-      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
-      LIBS="$LIBS -ldl"],
-      [AC_CHECK_FUNC(LoadLibrary, 
-        [if test $ac_cv_func_LoadLibrary = yes; then
-          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
-        fi
-        ], [AC_MSG_ERROR(No dynamic library loading support)]
-      )]
-    )
-  ])
+	tmp_SUCCESS="no"
+
+	# Unix
+	AC_CHECK_FUNC(
+		[dlopen],
+		[
+			AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+			tmp_SUCCESS="yes"
+		],
+		[
+			AC_CHECK_LIB(
+				[dl],
+				[dlopen],
+				[
+					AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+					LIBS="$LIBS -ldl"
+					tmp_SUCCESS="yes"
+				]
+			)
+		]
+	)
+
+	# Windows
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_CHECKING([for LoadLibrary])
+		AC_TRY_LINK(
+			[#include <windows.h>],
+			[LoadLibrary(NULL);],
+			[
+				AC_DEFINE(HAVE_LOADLIBRARY, 1, [Define if you have LoadLibrary])
+				tmp_SUCCESS="yes"
+			]
+		)
+		AC_MSG_RESULT([$tmp_SUCCESS])
+	fi
+
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_ERROR([No dynamic library loading support])
+	fi
 ])

Modified: trunk/softHSM/NEWS
===================================================================
--- trunk/softHSM/NEWS	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/softHSM/NEWS	2011-07-06 09:55:57 UTC (rev 5294)
@@ -22,6 +22,7 @@
 * Better exception handling.
 * CKF_USER_PIN_COUNT_LOW and CKF_SO_PIN_COUNT_LOW must be set 
   if an incorrect PIN has been entered at least once.
+* Detect LoadLibrary on Windows.
 
 
 SoftHSM 1.2.1 - 2011-05-03 

Modified: trunk/softHSM/m4/acx_dlopen.m4
===================================================================
--- trunk/softHSM/m4/acx_dlopen.m4	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/softHSM/m4/acx_dlopen.m4	2011-07-06 09:55:57 UTC (rev 5294)
@@ -1,17 +1,45 @@
 # $Id$
 
 AC_DEFUN([ACX_DLOPEN],[
-  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
-  [
-    AC_CHECK_LIB([dl],[dlopen], 
-      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
-      LIBS="$LIBS -ldl"],
-      [AC_CHECK_FUNC(LoadLibrary, 
-        [if test $ac_cv_func_LoadLibrary = yes; then
-          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
-        fi
-        ], [AC_MSG_ERROR(No dynamic library loading support)]
-      )]
-    )
-  ])
+	tmp_SUCCESS="no"
+
+	# Unix
+	AC_CHECK_FUNC(
+		[dlopen],
+		[
+			AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+			tmp_SUCCESS="yes"
+		],
+		[
+			AC_CHECK_LIB(
+				[dl],
+				[dlopen],
+				[
+					AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+					LIBS="$LIBS -ldl"
+					tmp_SUCCESS="yes"
+				]
+			)
+		]
+	)
+
+	# Windows
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_CHECKING([for LoadLibrary])
+		AC_TRY_LINK(
+			[#include <windows.h>],
+			[LoadLibrary(NULL);],
+			[
+				AC_DEFINE(HAVE_LOADLIBRARY, 1, [Define if you have LoadLibrary])
+				tmp_SUCCESS="yes"
+			]
+		)
+		AC_MSG_RESULT([$tmp_SUCCESS])
+	fi
+
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_ERROR([No dynamic library loading support])
+	fi
 ])

Modified: trunk/utils/m4/acx_dlopen.m4
===================================================================
--- trunk/utils/m4/acx_dlopen.m4	2011-07-06 08:34:29 UTC (rev 5293)
+++ trunk/utils/m4/acx_dlopen.m4	2011-07-06 09:55:57 UTC (rev 5294)
@@ -1,17 +1,45 @@
 # $Id$
 
 AC_DEFUN([ACX_DLOPEN],[
-  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
-  [
-    AC_CHECK_LIB([dl],[dlopen], 
-      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
-      LIBS="$LIBS -ldl"],
-      [AC_CHECK_FUNC(LoadLibrary, 
-        [if test $ac_cv_func_LoadLibrary = yes; then
-          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
-        fi
-        ], [AC_MSG_ERROR(No dynamic library loading support)]
-      )]
-    )
-  ])
+	tmp_SUCCESS="no"
+
+	# Unix
+	AC_CHECK_FUNC(
+		[dlopen],
+		[
+			AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+			tmp_SUCCESS="yes"
+		],
+		[
+			AC_CHECK_LIB(
+				[dl],
+				[dlopen],
+				[
+					AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])
+					LIBS="$LIBS -ldl"
+					tmp_SUCCESS="yes"
+				]
+			)
+		]
+	)
+
+	# Windows
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_CHECKING([for LoadLibrary])
+		AC_TRY_LINK(
+			[#include <windows.h>],
+			[LoadLibrary(NULL);],
+			[
+				AC_DEFINE(HAVE_LOADLIBRARY, 1, [Define if you have LoadLibrary])
+				tmp_SUCCESS="yes"
+			]
+		)
+		AC_MSG_RESULT([$tmp_SUCCESS])
+	fi
+
+	if test "$tmp_SUCCESS" = "no"
+	then
+		AC_MSG_ERROR([No dynamic library loading support])
+	fi
 ])




More information about the Opendnssec-commits mailing list