diff options
-rwxr-xr-x | configure | 48 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | portal-gui/Makefile.in | 3 |
3 files changed, 53 insertions, 1 deletions
@@ -593,6 +593,7 @@ ac_includes_default="\ ac_subst_vars='LTLIBOBJS LIBOBJS +DJANGO_ADMIN SECRET_KEY WEBUSER PYWRAP_LIBDIR @@ -4272,6 +4273,53 @@ then SECRET_KEY=`$PYTHON -c 'import random; print "".join(random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50))'` + # there is no standard name for this tool, so check for it + for ac_prog in django-admin django-admin.py +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_DJANGO_ADMIN+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + case $DJANGO_ADMIN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DJANGO_ADMIN="$DJANGO_ADMIN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_DJANGO_ADMIN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DJANGO_ADMIN=$ac_cv_path_DJANGO_ADMIN +if test -n "$DJANGO_ADMIN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DJANGO_ADMIN" >&5 +$as_echo "$DJANGO_ADMIN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DJANGO_ADMIN" && break +done + + ac_config_files="$ac_config_files portal-gui/Makefile" fi diff --git a/configure.ac b/configure.ac index 0ad0d9b4..2b14aef6 100644 --- a/configure.ac +++ b/configure.ac @@ -318,6 +318,9 @@ then # source: http://blog.leosoto.com/2008/04/django-secretkey-generation.html AC_SUBST(SECRET_KEY, `$PYTHON -c 'import random; print "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)])'`) + # there is no standard name for this tool, so check for it + AC_PATH_PROGS(DJANGO_ADMIN, [django-admin django-admin.py]) + AC_CONFIG_FILES([portal-gui/Makefile]) fi diff --git a/portal-gui/Makefile.in b/portal-gui/Makefile.in index f8cb2012..c91b29df 100644 --- a/portal-gui/Makefile.in +++ b/portal-gui/Makefile.in @@ -17,6 +17,7 @@ libexecdir=@libexecdir@ PYTHON=@PYTHON@ WEBUSER=@WEBUSER@ +DJANGO_ADMIN=@DJANGO_ADMIN@ CONFDIR=$(localstatedir)/rpki/conf DATABASE_PATH=$(localstatedir)/rpki/gui.db @@ -90,7 +91,7 @@ install-scripts: install-data: $(BUILD) install-apache install-templates install-scripts mkdir -p `dirname $(DATABASE_PATH)` - django-admin syncdb --settings rpki.gui.settings + $(DJANGO_ADMIN) syncdb --settings rpki.gui.settings install: install-data install-perms |