From 8850cd14bce9f8d9f78da25a99183a29742c3da4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 26 Jan 2019 17:05:43 +0100 Subject: [PATCH] acinclude: introduce --with-controldir=PATH and --with-controldir_var=PATH for control scripts Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bea70cffa95c14b74a37c719fe320b79003be953 Author: vanhofen Date: 2019-01-26 (Sat, 26 Jan 2019) Origin message was: ------------------ - acinclude: introduce --with-controldir=PATH and --with-controldir_var=PATH for control scripts ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 8 ++++++++ data/y-web/Makefile.am | 2 ++ src/nhttpd/yhttpd_mods/mod_yparser.cpp | 2 ++ 3 files changed, 12 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index 988d3f26e..24d344696 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -233,6 +233,12 @@ TUXBOX_APPS_DIRECTORY_ONE(configdir, CONFIGDIR, localstatedir, /var, /tuxbox/con TUXBOX_APPS_DIRECTORY_ONE(datadir, DATADIR, datadir, /share, /tuxbox, [--with-datadir=PATH], [where to find data files]) +TUXBOX_APPS_DIRECTORY_ONE(controldir, CONTROLDIR, datadir, /share, /tuxbox/neutrino/control, + [--with-controldir=PATH], [where to find control scripts]) + +TUXBOX_APPS_DIRECTORY_ONE(controldir_var, CONTROLDIR_VAR, localstatedir, /var, /tuxbox/control, + [--with-controldir_var=PATH], [where to find control scripts in /var]) + TUXBOX_APPS_DIRECTORY_ONE(fontdir, FONTDIR, datadir, /share, /fonts, [--with-fontdir=PATH], [where to find fonts]) @@ -303,6 +309,8 @@ TUXBOX_APPS_DIRECTORY_ONE(flagdir, FLAGDIR, localstatedir, /var, /etc, dnl automake <= 1.6 needs this specifications AC_SUBST(CONFIGDIR) AC_SUBST(DATADIR) +AC_SUBST(CONTROLDIR) +AC_SUBST(CONTROLDIR_VAR) AC_SUBST(FONTDIR) AC_SUBST(FONTDIR_VAR) AC_SUBST(GAMESDIR) diff --git a/data/y-web/Makefile.am b/data/y-web/Makefile.am index 179d7c8ca..d464b5e70 100644 --- a/data/y-web/Makefile.am +++ b/data/y-web/Makefile.am @@ -127,6 +127,8 @@ install-data-hook: sed -i \ -e 's|%(CONFIGDIR)|$(CONFIGDIR)|g' \ -e 's|%(DATADIR)|$(DATADIR)|g' \ + -e 's|%(CONTROLDIR)|$(CONTROLDIR)|g' \ + -e 's|%(CONTROLDIR_VAR)|$(CONTROLDIR_VAR)|g' \ -e 's|%(FONTDIR)|$(FONTDIR)|g' \ -e 's|%(FONTDIR_VAR)|$(FONTDIR_VAR)|g' \ -e 's|%(LIBDIR)|$(LIBDIR)|g' \ diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index b1e6fd9c9..75e91d552 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -452,6 +452,8 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) { else if (ycmd_type == "define-get") { if (ycmd_name.compare("CONFIGDIR")) yresult = CONFIGDIR; else if (ycmd_name.compare("DATADIR")) yresult = DATADIR; + else if (ycmd_name.compare("CONTROLDIR")) yresult = CONTROLDIR; + else if (ycmd_name.compare("CONTROLDIR_VAR")) yresult = CONTROLDIR_VAR; else if (ycmd_name.compare("FONTDIR")) yresult = FONTDIR; else if (ycmd_name.compare("FONTDIR_VAR")) yresult = FONTDIR_VAR; else if (ycmd_name.compare("LIBDIR")) yresult = LIBDIR;