1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# $Id$
AC_INIT(portal-gui, 1.0)
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PATH], [specify location of the python interpreter to use])],
[],
[with_python=detect])
AC_ARG_WITH([myrpki],
[AS_HELP_STRING([--with-myrpki=DIR], [specify the directory containing the myrpki.py command line tool])],
[],
[with_myrpki=no])
AS_IF([test "x$with_python" = "xdetect"],
[AC_CHECK_PROGS(PYTHON, [python2.6 python2.5 python], [none])],
[PYTHON=$with_python])
AS_IF([test "x$PYTHON" = "xnone"],
[AC_MSG_ERROR([unable to find python interpreter, use --with-python])])
AC_MSG_RESULT([Using python interpreter at $PYTHON])
AS_IF([test "x$with_myrpki" = "xno"],
[AC_MSG_ERROR([must specify the --with-myrpki option])])
MYRPKIDIR=$with_myrpki
MYRPKI_TOOL=$with_myrpki/myrpki.py
AC_MSG_RESULT([Full path to rpki Python module is $MYRPKIDIR])
AC_MSG_RESULT([Full path to the myrpki.py tool is $MYRPKI_TOOL])
AC_SUBST(MYRPKIDIR)
AC_SUBST(MYRPKI_TOOL)
# this is a bit of nastiness to expand $datarootdir for subsitution into
# the python scripts since we can't expand $prefix inline
if test x$prefix = xNONE; then
prefix=$ac_default_prefix
fi
eval 'exp_datarootdir='$datarootdir
AC_SUBST(MEDIADIR, "$exp_datarootdir/$PACKAGE_NAME/media")
AC_SUBST(TEMPLATEDIR, "$exp_datarootdir/$PACKAGE_NAME/rpkigui/templates")
AC_SUBST(INSTDIR, "$exp_datarootdir/$PACKAGE_NAME")
AC_MSG_RESULT([installing portal-gui into $INSTDIR])
if test "x$DATABASE_PATH" = x; then
eval 'exp_localstatedir='$localstatedir
DATABASE_PATH="$exp_localstatedir/$PACKAGE_NAME/rpkiop"
fi
AC_SUBST(DATABASE_PATH)
AC_MSG_RESULT([Full path to the portal-gui database is $DATABASE_PATH])
if test "x$CONFDIR" = x; then
AC_MSG_ERROR('Must specify the toplevel directory containing your resource handle files with CONFDIR=<DIR>')
fi
AC_MSG_RESULT([Toplevel resource directory is $CONFDIR])
AC_SUBST(CONFDIR)
# 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)])'`)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([rpkigui/settings.py rpkigui/urls.py scripts/helper rpkigui/django.wsgi])
AC_CONFIG_FILES([scripts/runserver])
AC_OUTPUT
|