# $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 datarootdir=${datarootdir} eval localstatedir=${localstatedir} AC_SUBST(MEDIADIR, "$datarootdir/$PACKAGE_NAME/media") AC_SUBST(TEMPLATEDIR, "$datarootdir/$PACKAGE_NAME/rpkigui/templates") AC_SUBST(INSTDIR, "$datarootdir/$PACKAGE_NAME") AC_MSG_RESULT([Installing portal-gui into $INSTDIR]) if test "x$DATABASE_PATH" = x; then DATABASE_PATH="$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=