diff options
author | Michael Elkins <melkins@tislabs.com> | 2011-11-11 14:55:27 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2011-11-11 14:55:27 +0000 |
commit | ba6d300828f2a35a07610ca95c1df33a8ea7cbc9 (patch) | |
tree | df5f45aed3f41004ff4165004c5c85fd65a44b97 | |
parent | 8d4f94aeb217de39052c9d64ba2088257afb2e55 (diff) |
Require both Python and Django >= 1.3 to be installed by default, unless the use explicitly uses the --disable-* arguments. closes #120
svn path=/trunk/; revision=4088
-rwxr-xr-x | configure | 20 | ||||
-rw-r--r-- | configure.ac | 17 |
2 files changed, 30 insertions, 7 deletions
@@ -2345,14 +2345,14 @@ fi if test "${enable_python+set}" = set; then : enableval=$enable_python; else - enable_python=auto + enable_python=yes fi # Check whether --enable-django was given. if test "${enable_django+set}" = set; then : enableval=$enable_django; else - enable_django=auto + enable_django=yes fi @@ -4198,6 +4198,15 @@ $as_echo_n "checking for Django... " >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_django" >&5 $as_echo "$have_django" >&6; } + + if test $have_django = yes + then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Django 1.3 or higher" >&5 +$as_echo_n "checking for Django 1.3 or higher... " >&6; } + django_recent=`$PYTHON -c "import django; print 'no' if django.VERSION < (1, 3) else 'yes'"` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $django_recent" >&5 +$as_echo "$django_recent" >&6; } + fi fi # Hmm, perhaps --enable-python should have been --with-python, @@ -4226,8 +4235,11 @@ case $enable_django in yes) build_django=yes if test $have_django = no then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You don't appear to have Django installed (but I'll try to build the Django-based GUI anyway)" >&5 -$as_echo "$as_me: WARNING: You don't appear to have Django installed (but I'll try to build the Django-based GUI anyway)" >&2;} + as_fn_error $? "You don't appear to have Django installed" "$LINENO" 5 + fi + if test $django_recent = no + then + as_fn_error $? "The portal gui requires Django 1.3 or higher" "$LINENO" 5 fi ;; no) build_django=no diff --git a/configure.ac b/configure.ac index 73e5e098..f9a37b5f 100644 --- a/configure.ac +++ b/configure.ac @@ -28,8 +28,8 @@ fi AC_ARG_WITH([system_openssl], [AS_HELP_STRING([--with-system-openssl], [Link against system copy of OpenSSL])], [], [with_system_openssl=auto]) AC_ARG_ENABLE([openssl_asm], [AS_HELP_STRING([--disable-openssl-asm], [Don't let OpenSSL build assembler code])], [], [enable_openssl_asm=auto]) -AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [Don't build any of the Python-based tools])], [], [enable_python=auto]) -AC_ARG_ENABLE([django], [AS_HELP_STRING([--disable-django], [Don't build Django GUI])], [], [enable_django=auto]) +AC_ARG_ENABLE([python], [AS_HELP_STRING([--disable-python], [Don't build any of the Python-based tools])], [], [enable_python=yes]) +AC_ARG_ENABLE([django], [AS_HELP_STRING([--disable-django], [Don't build Django GUI])], [], [enable_django=yes]) AC_PROG_CC AC_PROG_INSTALL @@ -252,6 +252,13 @@ else have_django="no" fi AC_MSG_RESULT([$have_django]) + + if test $have_django = yes + then + AC_MSG_CHECKING([for Django 1.3 or higher]) + django_recent=`$PYTHON -c "import django; print 'no' if django.VERSION < (1, 3) else 'yes'"` + AC_MSG_RESULT([$django_recent]) + fi fi # Hmm, perhaps --enable-python should have been --with-python, @@ -279,7 +286,11 @@ case $enable_django in yes) build_django=yes if test $have_django = no then - AC_MSG_WARN([You don't appear to have Django installed (but I'll try to build the Django-based GUI anyway)]) + AC_MSG_ERROR([You don't appear to have Django installed]) + fi + if test $django_recent = no + then + AC_MSG_ERROR([The portal gui requires Django 1.3 or higher]) fi ;; no) build_django=no |