diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 113 |
1 files changed, 87 insertions, 26 deletions
@@ -4143,9 +4143,8 @@ esac # Now a bunch of checks to figure out what we can do with Python. If # we don't have Python at all, none of the rest of this matters. If -# we do have Python, we need to check what antics we need to go -# through to build the OpenSSL interface extension module, and also -# whether the Django code is installed for our GUI. +# we do have Python, we need to check for required packages and +# versions. # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 @@ -4188,19 +4187,24 @@ fi -if test "x$PYTHON" = "x" +have_python=no +have_acceptable_python=no +have_python_h=no +have_django=no +have_acceptable_django=no +have_lxml=no +have_mysqldb=no +have_pyyaml=no + +if test "x$PYTHON" != "x" then - have_python=no - have_python_h=no - have_django=no -else have_python=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python version 2.6 or higher" >&5 $as_echo_n "checking for Python version 2.6 or higher... " >&6; } - python_version_ok=`$PYTHON -c 'import sys; print "yes" if sys.version_info[0] == 2 and sys.version_info[1] >= 6 else "no"'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_version_ok" >&5 -$as_echo "$python_version_ok" >&6; } + have_acceptable_python=`$PYTHON -c 'import sys; print "yes" if sys.version_info[0] == 2 and sys.version_info[1] >= 6 else "no"'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_acceptable_python" >&5 +$as_echo "$have_acceptable_python" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking distutils to find out where Python.h should be" >&5 $as_echo_n "checking distutils to find out where Python.h should be... " >&6; } @@ -4218,13 +4222,29 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lxml.etree" >&5 +$as_echo_n "checking for lxml.etree... " >&6; } + if $PYTHON -c 'import lxml.etree' 2>/dev/null + then + have_lxml=yes + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_lxml" >&5 +$as_echo "$have_lxml" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQLdb" >&5 +$as_echo_n "checking for MySQLdb... " >&6; } + if $PYTHON -c 'import MySQLdb' 2>/dev/null + then + have_mysqldb=yes + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mysqldb" >&5 +$as_echo "$have_mysqldb" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Django" >&5 $as_echo_n "checking for Django... " >&6; } if $PYTHON -c 'import django' 2>/dev/null then have_django="yes" - else - have_django="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_django" >&5 $as_echo "$have_django" >&6; } @@ -4233,21 +4253,41 @@ $as_echo "$have_django" >&6; } then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Django 1.2 or higher" >&5 $as_echo_n "checking for Django 1.2 or higher... " >&6; } - django_recent=`$PYTHON -c "import django; print 'no' if django.VERSION < (1, 2) else 'yes'"` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $django_recent" >&5 -$as_echo "$django_recent" >&6; } + have_acceptable_django=`$PYTHON -c "import django; print 'no' if django.VERSION < (1, 2) else 'yes'"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_acceptable_django" >&5 +$as_echo "$have_acceptable_django" >&6; } + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PyYAML" >&5 +$as_echo_n "checking for PyYAML... " >&6; } + if $PYTHON -c 'import YAML' 2>/dev/null + then + have_pyyaml=yes fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pyyaml" >&5 +$as_echo "$have_pyyaml" >&6; } fi +ok=yes + if test $enable_ca_tools = yes || test $enable_rpki_rtr = yes then if test $have_python = no then - as_fn_error $? "I can't find a Python binary, maybe you need to set PATH?" "$LINENO" 5 + ok=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&5 +$as_echo "$as_me: WARNING: I can't find a Python binary, perhaps you need to set PATH?" >&2;} fi - if test $python_version_ok = no + if test $have_acceptable_python = no then - as_fn_error $? "The RPKI code requires Python version 2.x, for x = 6 or higher." "$LINENO" 5 + ok=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&5 +$as_echo "$as_me: WARNING: The RPKI code requires Python version 2.x, for x = 6 or higher." >&2;} + fi + if test $ok = no + then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you do not wish to install the rpki-rtr code, please specify --disable-rpki-rtr as an argument to this configure script." >&5 +$as_echo "$as_me: WARNING: If you do not wish to install the rpki-rtr code, please specify --disable-rpki-rtr as an argument to this configure script." >&2;} fi fi @@ -4255,17 +4295,20 @@ case $enable_ca_tools in yes) build_ca_tools=yes if test $have_python_h = no then - as_fn_error $? "I can't find Python.h. Python sources are required to build the CA tools, please install them. - If you do not wish to install the CA tools, please specify --disable-ca-tools as an argument to this configure script." "$LINENO" 5 + ok=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&5 +$as_echo "$as_me: WARNING: I can't find Python.h. Python sources are required to build the CA tools." >&2;} fi - if test $have_django = no + if test $have_acceptable_django = no then - as_fn_error $? "You don't appear to have Django installed. Django is required by the CA tools, please install Django version 1.2 or higher. - If you do not wish to install the CA tools, please specify --disable-ca-tools as an argument to this configure script." "$LINENO" 5 + ok=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The RPKI CA tools require Django 1.2 or higher." >&5 +$as_echo "$as_me: WARNING: The RPKI CA tools require Django 1.2 or higher." >&2;} fi - if test $django_recent = no + if test $ok = no then - as_fn_error $? "The CA tools require Django 1.2 or higher." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&5 +$as_echo "$as_me: WARNING: If you do not wish to install the RPKI CA tools, please specify --disable-ca-tools as an argument to this configure script." >&2;} fi ;; no) build_ca_tools=no @@ -4281,6 +4324,24 @@ case $enable_rpki_rtr in *) as_fn_error $? "Unrecognized value for --enable-rpki-rtr: $enable_rpki_rtr" "$LINENO" 5;; esac + +if test $build_ca_tools = yes && test $have_pyyaml = no +then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PyYAML missing, so \"make test\" will not work properly." >&5 +$as_echo "$as_me: WARNING: PyYAML missing, so \"make test\" will not work properly." >&2;} +fi + +if test "x$XSLTPROC" = "x" +then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc missing, so \"make test\" will not work properly." >&5 +$as_echo "$as_me: WARNING: xsltproc missing, so \"make test\" will not work properly." >&2;} +fi + +if test $ok = no +then + as_fn_error $? "Please correct the problems above then re-run this configuration script." "$LINENO" 5 +fi + # Figure out which parts of this package we have to build. TOP_LEVEL_SUBDIRS="" |