summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac14
2 files changed, 19 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 1d1132e..f7ffabe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,11 @@
eselectdir = $(datadir)/eselect/modules
nodist_eselect_DATA = $(srcdir)/src/php.eselect
-apacheconfdir = $(sysconfdir)/apache2/modules.d
-nodist_apacheconf_DATA = $(srcdir)/src/70_mod_php.conf
+if APACHE2
+ # Without these set, we won't try to install the conf file.
+ apacheconfdir = $(sysconfdir)/apache2/modules.d
+ nodist_apacheconf_DATA = $(srcdir)/src/70_mod_php.conf
+endif
# The next few rules allow us to replace bindir, libdir, and
# localstatedir within our script and conf file. The example is taken
diff --git a/configure.ac b/configure.ac
index c118e0e..f977807 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,20 @@ AC_PROG_SED
AC_PATH_PROG(SORT,sort)
AC_PATH_PROG(UNIQ,uniq)
+
+# --enable-apache2 flag, disabled by default, that decides whether or
+# not we install the apache2 module configuration file.
+AC_ARG_ENABLE(
+ [apache2],
+ [ --enable-apache2 install the apache2 conf file [[default=no]]],
+ [case "${enableval}" in
+ yes) apache2=true ;;
+ no) apache2=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-apache2]) ;;
+ esac],[apache2=false])
+ AM_CONDITIONAL([APACHE2], [test x$apache2 = xtrue])
+
+
# List of output files.
AC_CONFIG_FILES([Makefile src/php.eselect.in])