]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
libcrypto and python checks.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 23 Apr 2009 15:47:49 +0000 (15:47 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 23 Apr 2009 15:47:49 +0000 (15:47 +0000)
git-svn-id: file:///svn/unbound/trunk@1616 be551aaa-1e26-0410-a405-d3ace91eadb9

acx_nlnetlabs.m4
acx_python.m4
configure
configure.ac
doc/Changelog

index 314784ff0bfe5896bc9c3ee9f7a75a31ae9c5880..614b4a30aaa8f8be82e5a5e84a381ccb48113f44 100644 (file)
@@ -606,6 +606,7 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
              ], [
                AC_MSG_RESULT(no)
                # check if -lwsock32 or -lgdi32 are needed.     
+               BAKLIBS="$LIBS"
                LIBS="$LIBS -lgdi32"
                AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
                AC_TRY_LINK([], [
@@ -617,7 +618,20 @@ AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
                    AC_MSG_RESULT(yes) 
                  ],[
                    AC_MSG_RESULT(no)
+                   LIBS="$BAKLIBS"
+                   LIBS="$LIBS -ldl"
+                   AC_MSG_CHECKING([if -lcrypto needs -ldl])
+                   AC_TRY_LINK([], [
+                       int HMAC_CTX_init(void);
+                       (void)HMAC_CTX_init();
+                     ],[
+                       AC_DEFINE([HAVE_HMAC_CTX_INIT], 1, 
+                           [If you have HMAC_CTX_init])
+                       AC_MSG_RESULT(yes) 
+                     ],[
+                       AC_MSG_RESULT(no)
                     AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
+                   ])
                ])
             ])
         fi
index 0281979e231f18a00ae73189287d016d527794ec..f4bf421f86157f3a117ecb0b39401e346234d7a2 100644 (file)
@@ -13,6 +13,11 @@ AC_DEFUN([AC_PYTHON_DEVEL],[
            PYTHON_VERSION=""
         fi
 
+        if test -z "$PYTHON_VERSION"; then
+               PYTHON_VERSION=`$PYTHON -c "import sys, string; \
+                       print string.split(sys.version)[[0]]"`
+       fi
+
         #
         # Check for a version of Python >= 2.1.0
         #
index cd1269af107a097a0441a5f3d988d73ed58baf20..b4643ef62c8114d4d236dcf378b0bfbb44571568 100755 (executable)
--- a/configure
+++ b/configure
@@ -22634,6 +22634,11 @@ echo "$as_me: error: Cannot find python$PYTHON_VERSION in your system path" >&2;
            PYTHON_VERSION=""
         fi
 
+        if test -z "$PYTHON_VERSION"; then
+               PYTHON_VERSION=`$PYTHON -c "import sys, string; \
+                       print string.split(sys.version)[0]"`
+       fi
+
         #
         # Check for a version of Python >= 2.1.0
         #
@@ -22921,7 +22926,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
         # all done!
         #
 
-   if test ! -z "PYTHON_VERSION"; then
+   if test ! -z "$PYTHON_VERSION"; then
+       if test `$PYTHON -c "print '$PYTHON_VERSION' >= '2.4.0'"` = "False"; then
+               { { echo "$as_me:$LINENO: error: Python version >= 2.4.0 is required" >&5
+echo "$as_me: error: Python version >= 2.4.0 is required" >&2;}
+   { (exit 1); exit 1; }; }
+       fi
 
       # Have Python
 
@@ -23084,8 +23094,8 @@ _ACEOF
          fi
       fi
    else
-      { echo "$as_me:$LINENO: result: Python libraries not found, won't build PythonMod or PyUnbound" >&5
-echo "${ECHO_T}Python libraries not found, won't build PythonMod or PyUnbound" >&6; }
+      { echo "$as_me:$LINENO: result: *** Python libraries not found, won't build PythonMod or PyUnbound ***" >&5
+echo "${ECHO_T}*** Python libraries not found, won't build PythonMod or PyUnbound ***" >&6; }
       ub_with_pyunbound=no
       ub_with_pythonmod=no
    fi
@@ -23205,6 +23215,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
                { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                # check if -lwsock32 or -lgdi32 are needed.
+               BAKLIBS="$LIBS"
                LIBS="$LIBS -lgdi32"
                { echo "$as_me:$LINENO: checking if -lcrypto needs -lgdi32" >&5
 echo $ECHO_N "checking if -lcrypto needs -lgdi32... $ECHO_C" >&6; }
@@ -23259,6 +23270,62 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 
                    { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+                   LIBS="$BAKLIBS"
+                   LIBS="$LIBS -ldl"
+                   { echo "$as_me:$LINENO: checking if -lcrypto needs -ldl" >&5
+echo $ECHO_N "checking if -lcrypto needs -ldl... $ECHO_C" >&6; }
+                   cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+                       int HMAC_CTX_init(void);
+                       (void)HMAC_CTX_init();
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HMAC_CTX_INIT 1
+_ACEOF
+
+                       { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+                       { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
                     { { echo "$as_me:$LINENO: error: OpenSSL found in $ssldir, but version 0.9.7 or higher is required" >&5
 echo "$as_me: error: OpenSSL found in $ssldir, but version 0.9.7 or higher is required" >&2;}
@@ -23271,6 +23338,11 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+fi
+
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
         fi
index aa585e527858eb952b1d45e6f9331493a7b8c0e8..6fbfcc8ecee701d6691dd9ac466dc54bb2c7ad1e 100644 (file)
@@ -296,7 +296,10 @@ if test x_$ub_test_python != x_no; then
    # Check for Python
    ub_have_python=no
    AC_PYTHON_DEVEL
-   if test ! -z "PYTHON_VERSION"; then
+   if test ! -z "$PYTHON_VERSION"; then
+       if test `$PYTHON -c "print '$PYTHON_VERSION' >= '2.4.0'"` = "False"; then
+               AC_ERROR([Python version >= 2.4.0 is required])
+       fi
 
       # Have Python
       AC_DEFINE(HAVE_PYTHON,1,[Define if you have Python libraries and header files.])
@@ -334,7 +337,7 @@ if test x_$ub_test_python != x_no; then
          fi
       fi
    else
-      AC_MSG_RESULT([Python libraries not found, won't build PythonMod or PyUnbound])
+      AC_MSG_RESULT([*** Python libraries not found, won't build PythonMod or PyUnbound ***])
       ub_with_pyunbound=no
       ub_with_pythonmod=no
    fi
index f57f97443f8a53283602dc8558e2781beb228215..2654cf3dfbf0d5d5dd5595c6c7722f552a996fda 100644 (file)
@@ -3,6 +3,8 @@
        - iana portlist updated.
        - fix pylib test for Darwin.
        - fix pymod test for Darwin and a python threading bug in pymod init.
+       - check python >= 2.4 in configure.
+       - -ldl check for libcrypto 1.0.0beta.
 
 21 April 2009: Wouter
        - fix for build outside sourcedir.