examples = @top_srcdir@/Open-ILS/examples
jsbackend = @srcdir@/javascript/backend
supportscr = @srcdir@/support-scripts
-webdir = $(WEBDIR)
-opacjsdir = $(DESTDIR)$(WEBDIR)/opac/common/js
-jsdojodir = $(DESTDIR)$(WEBDIR)/js/dojo
-jsdojoosrfdir = $(DESTDIR)$(WEBDIR)/js/dojo/opensrf
-opacextrasdir = $(DESTDIR)$(WEBDIR)/opac/extras/xsl/
-reportsdir = $(DESTDIR)$(WEBDIR)/reports/
# Collect files to be used by multiple targets
# Decide which entities to build
+sysconf_DATA = $(examples)/opensrf.xml.example \
+ $(examples)/opensrf_core.xml.example \
+ $(examples)/fm_IDL.xml \
+ $(examples)/oils_sip.xml.example \
+ $(examples)/oils_web.xml.example \
+ $(examples)/lib_ips.txt.example
+
#----------------------------
# Build ILS CORE
#----------------------------
core_data = @srcdir@/extras/ils_events.xml \
$(examples)/hold_notification_template.example
-sysconf_DATA = $(examples)/opensrf.xml.example \
- $(examples)/opensrf_core.xml.example \
- $(examples)/fm_IDL.xml \
- $(examples)/oils_sip.xml.example \
- $(examples)/oils_web.xml.example \
- $(examples)/lib_ips.txt.example
-
core_scripts = $(examples)/oils_ctl.sh \
$(supportscr)/fine_generator.pl \
$(supportscr)/hold_targeter.pl \
endif
#--------------------
-# Build ILS WEB
+# Build Apache modules
#--------------------
-if BUILDILSWEB
-OILSWEB_DIRS = apachemods
-OILSWEB_INST = webcore-install offline-install cgi-bootstrap
-
-#webcore-install
-
-reports_SCRIPTS = @top_srcdir@/Open-ILS/xul/staff_client/server/admin/adminlib.js
-opacjs_SCRIPTS = $(OPENSRF_LIBS)/javascript/DojoSRF.js \
- $(OPENSRF_LIBS)/javascript/JSON_v0.js \
- $(OPENSRF_LIBS)/javascript/JSON_v1.js \
- $(OPENSRF_LIBS)/javascript/md5.js \
- $(OPENSRF_LIBS)/javascript/opensrf.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js \
- @top_srcdir@/Open-ILS/xul/staff_client/chrome//content//util/date.js
-jsdojo_SCRIPTS = $(OPENSRF_LIBS)/javascript/DojoSRF.js
-jsdojoosrf_SCRIPTS = $(OPENSRF_LIBS)/javascript/md5.js \
- $(OPENSRF_LIBS)/javascript/JSON_v1.js \
- $(OPENSRF_LIBS)/javascript/opensrf.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xhr.js \
- $(OPENSRF_LIBS)/javascript/opensrf_xmpp.js
-
-installautojs = $(autojsbinscripts)
-
-
+if BUILDAPACHEMODS
+OILSWEB_DIR = apachemods
endif
-
#---------------------
# Build ILS Reporter
#---------------------
endif
#------------------------------
-# Build ILS XUL CLIENT/SERVER
-#------------------------------
-
-if BUILDILSCLIENT
-OILSCLIENT_DIRS = ../xul/staff_client
-OILSSERVER_INST = server-xul
-endif
-
-#------------------------------
# Build EVERGREEN PYTHON
#------------------------------
bin_SCRIPTS = $(core_scripts) $(reporter_scripts) $(installautojs) @srcdir@/extras/eg_config
data_DATA = $(core_data) $(reporter_data)
-# Take care of which subdirectories to build, and which extra files to include in a distibution.
+# Take care of which subdirectories to build, and which extra files to include in a distribution.
-SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIRS) $(OILSCLIENT_DIRS) $(OILSPYTHON_DIR) $(OILSJAVA_DIR)
+SUBDIRS = $(OILSCORE_DIRS) $(OILSWEB_DIR) $(OILSPYTHON_DIR) $(OILSJAVA_DIR)
EXTRA_DIST = @srcdir@/perlmods @srcdir@/templates @top_srcdir@/Open-ILS/xsl @srcdir@/cgi-bin
# Install everything that did not get installed by autotools
-install-data-hook: $(OILSCORE_INST) $(OILSWEB_INST) $(OILSREP_INST) $(OILSSERVER_INST)
+install-data-hook: $(OILSCORE_INST) $(OILSWEB_INST) $(OILSREP_INST)
uninstall-hook:
rm -R $(perldir)
rm -R $(TEMPLATEDIR)
rm -R $(XSLDIR)
rm -R $(CGIDIR)
- rm -R $(webdir)
- rm -R $(opacextrasdir)
#perl-install and string-templates-install
sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/thaw_expired_frozen_holds.srfsh'
sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/offline-blocked-list.pl'
-webcore-install:
- mkdir -p $(WEBDIR)
- mkdir -p $(WEBDIR)/opac/extras/slimpac/
- mkdir -p $(WEBDIR)/standalone/
- mkdir -p $(opacextrasdir)
- mkdir -p $(DESTDIR)$(reportsdir)
- mkdir -p $(XSLDIR)
- rm -f $(DESTDIR)$(reportsdir)/fm_IDL.xml
- cp $(DESTDIR)@sysconfdir@/fm_IDL.xml $(DESTDIR)$(WEBDIR)/reports/
- cp -r @top_srcdir@/Open-ILS/web/. $(DESTDIR)$(WEBDIR)
- cp @top_srcdir@/Open-ILS/xsl/*.xsl $(opacextrasdir)
- cp @top_srcdir@/Open-ILS/xsl/*.xsl $(XSLDIR)
- cp -r $(DESTDIR)$(WEBDIR)/opac/skin/default/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
- cp -r @top_srcdir@/Open-ILS/web/opac/skin/craftsman/* $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/mresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/rresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/rdetail.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/advanced.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/myopac.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/default/xml/cnbrowse.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/mresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/rresult.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/rdetail.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/advanced.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/myopac.xml
- ln -sf $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/index.xml $(DESTDIR)$(WEBDIR)/opac/skin/craftsman/xml/cnbrowse.xml
-
-
-offline-install:
- @echo "Installing offline CGIs to $(CGIDIR)/offline";
- mkdir -p $(TMP)
- mkdir -p $(CGIDIR)/offline;
- mkdir -p $(datadir)/offline;
- perl -pe "s{##CONFIG##}{@sysconfdir@}" < @srcdir@/offline/offline.pl > $(TMP)/offline.pl;
- cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
- chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
-
-cgi-bootstrap:
- @echo "Installing cgi's to $(CGIDIR)"
- mkdir -p $(TMP)/cgi-bin
- mkdir -p $(CGIDIR)
- for i in @srcdir@/cgi-bin/*cgi; do perl -pe "s{##CONFIG##}{@sysconfdir@}" < $$i > $(TMP)/$$i; done
- cp $(TMP)/cgi-bin/*cgi $(CGIDIR)
- cp -r @srcdir@/cgi-bin/support $(CGIDIR)
- chmod 755 $(DESTDIR)$(CGIDIR)/*cgi
-
-server-xul:
- @echo $@
- mkdir -p $(WEBDIR)
- mkdir -p $(WEBDIR)/xul/
- @echo "BUILD_ID = $(STAFF_CLIENT_BUILD_ID)"
- @echo "Copying xul into $(WEBDIR)/xul/$(STAFF_CLIENT_BUILD_ID)"
- mkdir -p "$(WEBDIR)/xul/$(STAFF_CLIENT_BUILD_ID)"
- cp -R @top_srcdir@/Open-ILS/xul/staff_client/build/server "${WEBDIR}/xul/${STAFF_CLIENT_BUILD_ID}/"
-
reporter-install:
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/clark-kent.pl'
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/find_orphaned_reports.pl'
# Checks for programs.
#-----------------------------------
+
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_INSTALL
AM_CONDITIONAL([BUILDILSWEB], [test x$openils_web = xtrue])
+# install Evergreen Apache modules?
+AC_ARG_ENABLE([apache-modules],
+[ --disable-apache-modules disables installation of the Evergreen Apache modules ],
+[case "${enableval}" in
+ yes) build_apachemods=true ;;
+ no) build_apachemods=false ;;
+ *) AC_MSG_ERROR([please choose another value for --disable-apache-modules (supported values are yes or no])
+esac],
+[build_apachemods=true])
+
+AM_CONDITIONAL([BUILDAPACHEMODS], [test x$build_apachemods = xtrue])
+
# build evergreen-reporter ?
AC_ARG_ENABLE([reporter],
AM_CONDITIONAL([BUILDEGPYTHON], [test x$EG_PYTHON_INSTALL = xtrue])
-
-
#-----------------------------------
# Check for dependencies
#-----------------------------------
-AC_CHECK_PROG([MEMCACHED],memcached,yes,no)
-if test $MEMCACHED = "no"; then
- AC_MSG_ERROR([*** memcached not found, aborting])
-fi
-
-AC_CHECK_PROG([ASPELL],aspell,yes,no)
-if test $ASPELL = "no"; then
- AC_MSG_ERROR([*** aspell not found, aborting])
-fi
-
-AC_CHECK_PROG([CPAN],cpan,yes,no)
-if test $CPAN = "no"; then
- AC_MSG_ERROR([*** cpan not found, aborting])
-fi
-
-AC_CHECK_PROG([YAZ],yaz-config,yes,no)
-if test $YAZ = "no"; then
- AC_MSG_ERROR([*** yaz not found, aborting])
-fi
-
-AC_CHECK_PROG([PERL],perl,yes,no)
-if test $PERL = "no"; then
- AC_MSG_ERROR([*** perl not found, aborting])
-fi
-
+AC_ARG_WITH([opensrf-headers],
+[ --with-opensrf-headers=path location of the OpenSRF header files (default is /openils/include/)],
+[OPENSRF_HEADERS=${withval}],
+[OPENSRF_HEADERS=/openils/include/])
+AC_SUBST([OPENSRF_HEADERS])
-#-----------------------------------
-# Set install path variables
-#-----------------------------------
+# We need this for JavaScript
+AC_ARG_WITH([opensrf-libs],
+[ --with-opensrf-libs=path location of the OpenSRF libraries (default is /openils/lib/)],
+[OPENSRF_LIBS=${withval}],
+[OPENSRF_LIBS=/openils/lib/])
+AC_SUBST([OPENSRF_LIBS])
AC_ARG_WITH([tmp],
[ --with-tmp=path location of the Evergreen temporary directory (default is /tmp) ],
[TMP=/tmp])
AC_SUBST([TMP])
-
-APXS2=`apxs2 -q BINDIR`/apxs2
+AC_ARG_WITH([apxs],
+[ --with-apxs=path location of the apxs Apache configuration tool (default is /usr/bin/apxs2)],
+[APXS2=${withval}],
+[APXS2=/usr/bin/apxs2])
AC_SUBST([APXS2])
-APACHE2_HEADERS=`apxs2 -q INCLUDEDIR`
+AC_ARG_WITH([apache],
+[ --with-apache=path location of the Apache headers (default is /usr/include/apache2)],
+[APACHE2_HEADERS=${withval}],
+[APACHE2_HEADERS=/usr/include/apache2])
AC_SUBST([APACHE2_HEADERS])
-APR_HEADERS=`apr-config --includedir`
+AC_ARG_WITH([apr],
+[ --with-apr=path location of the Apache Portable Runtime (APR) headers (default is /usr/include/apr-1.0/)],
+[APR_HEADERS=${withval}],
+[APR_HEADERS=/usr/include/apr-1.0])
AC_SUBST([APR_HEADERS])
AC_ARG_WITH([libxml2],
[DBI_LIBS=/usr/local/lib/dbd/])
AC_SUBST([DBI_LIBS])
-AC_ARG_WITH([opensrf-headers],
-[ --with-opensrf-headers=path location of the OpenSRF header files (default is /openils/include/)],
-[OPENSRF_HEADERS=${withval}],
-[OPENSRF_HEADERS=/openils/include/])
-AC_SUBST([OPENSRF_HEADERS])
-
-AC_ARG_WITH([opensrf-libs],
-[ --with-opensrf-libs=path location of the OpenSRF libraries (default is /openils/lib/)],
-[OPENSRF_LIBS=${withval}],
-[OPENSRF_LIBS=/openils/lib/])
-AC_SUBST([OPENSRF_LIBS])
-
-#------------------------------------
-# Checks for libraries.
-#------------------------------------
-
-# Check for the existence of libraries in non-standard locations
-
-AC_MSG_CHECKING(for -lopensrf)
-if test -e ${OPENSRF_LIBS}/libopensrf.so; then
-AC_MSG_RESULT([yes])
-else
-AC_MSG_ERROR([*** libopensrf not found (or not in location specified to configure), aborting])
+if test "x$openils_core" = "xtrue"; then
+
+ AC_CHECK_PROG([MEMCACHED],memcached,yes,no)
+ if test $MEMCACHED = "no"; then
+ AC_MSG_ERROR([*** memcached not found, aborting])
+ fi
+
+ AC_CHECK_PROG([ASPELL],aspell,yes,no)
+ if test $ASPELL = "no"; then
+ AC_MSG_ERROR([*** aspell not found, aborting])
+ fi
+
+ AC_CHECK_PROG([CPAN],cpan,yes,no)
+ if test $CPAN = "no"; then
+ AC_MSG_ERROR([*** cpan not found, aborting])
+ fi
+
+ AC_CHECK_PROG([YAZ],yaz-config,yes,no)
+ if test $YAZ = "no"; then
+ AC_MSG_ERROR([*** yaz not found, aborting])
+ fi
+
+ AC_CHECK_PROG([PERL],perl,yes,no)
+ if test $PERL = "no"; then
+ AC_MSG_ERROR([*** perl not found, aborting])
+ fi
+
+ #------------------------------------
+ # Checks for libraries.
+ #------------------------------------
+
+ # Check for the existence of libraries in non-standard locations
+
+ AC_MSG_CHECKING(for -lopensrf)
+ if test -e ${OPENSRF_LIBS}/libopensrf.so; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([*** libopensrf not found (or not in location specified to configure), aborting])
+ fi
+
+ # Check for the rest of the libraries
+
+ #check for dynamic linking functions
+ AC_CHECK_LIB(dl,dlopen)
+
+ #check for the libdbi library
+ AC_CHECK_LIB(dbi,dbi_initialize)
+
+ #to check for the availability and function of a particular
+ #driver we need a runtime check (since the driver is loaded
+ #dynamically). This example checks for the mysql driver
+ AC_MSG_CHECKING([for libdbi pgsql driver (dynamic load)])
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(,
+ [[dbi_initialize(0); return(dbi_conn_new("pgsql") ? 0 : 1);]])],
+ [AC_MSG_RESULT("yes")],
+ [AC_MSG_FAILURE("pgsql driver not installed?")])
+
+ AC_CHECK_LIB([expat], [main], [], AC_MSG_ERROR(*** OpenILS requires libexpat))
+ AC_CHECK_LIB([readline], [main], [], AC_MSG_ERROR(*** OpenILS requires libreadline))
+ AC_CHECK_LIB([xml2], [main], [], AC_MSG_ERROR(*** OpenILS requires libxml2))
+ AC_CHECK_LIB([xslt], [main], [], AC_MSG_ERROR(*** OpenILS requires libxslt))
+ AC_CHECK_LIB([perl], [main], [], AC_MSG_ERROR(*** OpenILS requires libperl-dev))
+ AC_CHECK_LIB([pq], [main], [], AC_MSG_ERROR(*** OpenILS requires libpq))
+
+
+ #------------------------------------
+ # Checks for header files.
+ #------------------------------------
+
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS([fcntl.h langinfo.h locale.h stdlib.h string.h unistd.h])
+
+ #-------------------------------------------------------------------
+ # Checks for typedefs, structures, and compiler characteristics.
+ #-------------------------------------------------------------------
+
+ AC_C_CONST
+ AC_TYPE_SIZE_T
+ AC_STRUCT_TM
+ AC_HEADER_STDBOOL
+
+ #-------------------------------------------------------------------
+ # Checks for library functions.
+ #-------------------------------------------------------------------
+
+ AC_FUNC_STRFTIME
+ AC_FUNC_STRTOD
+ AC_CHECK_FUNCS([localtime_r memset nl_langinfo setlocale strcasecmp strchr strdup strerror strncasecmp])
+
+ #----------------------------
+ # Create Makefiles/Output
+ #----------------------------
+
+ AC_CONFIG_FILES([Open-ILS/examples/Makefile
+ Open-ILS/src/c-apps/Makefile
+ Open-ILS/src/extras/Makefile
+ Open-ILS/src/java/Makefile
+ Open-ILS/src/python/Makefile])
fi
-# Check for the rest of the libraries
-
-#check for dynamic linking functions
-AC_CHECK_LIB(dl,dlopen)
-
-#check for the libdbi library
-AC_CHECK_LIB(dbi,dbi_initialize)
-
-#to check for the availability and function of a particular
-#driver we need a runtime check (since the driver is loaded
-#dynamically). This example checks for the mysql driver
-AC_MSG_CHECKING([for libdbi pgsql driver (dynamic load)])
-AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(,
- [[dbi_initialize(0); return(dbi_conn_new("pgsql") ? 0 : 1);]])],
- [AC_MSG_RESULT("yes")],
- [AC_MSG_FAILURE("pgsql driver not installed?")])
-
-AC_CHECK_LIB([expat], [main], [], AC_MSG_ERROR(*** OpenILS requires libexpat))
-AC_CHECK_LIB([readline], [main], [], AC_MSG_ERROR(*** OpenILS requires libreadline))
-AC_CHECK_LIB([xml2], [main], [], AC_MSG_ERROR(*** OpenILS requires libxml2))
-AC_CHECK_LIB([xslt], [main], [], AC_MSG_ERROR(*** OpenILS requires libxslt))
-AC_CHECK_LIB([perl], [main], [], AC_MSG_ERROR(*** OpenILS requires libperl-dev))
-AC_CHECK_LIB([pq], [main], [], AC_MSG_ERROR(*** OpenILS requires libpq))
-
+if test "x$build_apachemods" = "xtrue"; then
-#------------------------------------
-# Checks for header files.
-#------------------------------------
+ #-----------------------------------
+ # Set install path variables
+ #-----------------------------------
-AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h langinfo.h locale.h stdlib.h string.h unistd.h])
+ #APACHE PREFORK DEV TEST
+ AC_MSG_CHECKING([APXS2])
+ if test -x "${APXS2}"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([*** apxs not found, aborting])
+ fi
-#-------------------------------------------------------------------
-# Checks for typedefs, structures, and compiler characteristics.
-#-------------------------------------------------------------------
-
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_STRUCT_TM
-AC_HEADER_STDBOOL
-
-#-------------------------------------------------------------------
-# Checks for library functions.
-#-------------------------------------------------------------------
-
-AC_FUNC_STRFTIME
-AC_FUNC_STRTOD
-AC_CHECK_FUNCS([localtime_r memset nl_langinfo setlocale strcasecmp strchr strdup strerror strncasecmp])
-
-#----------------------------
-# Create Makefiles/Output
-#----------------------------
+ AC_CONFIG_FILES([Open-ILS/src/apachemods/Makefile])
+fi
AC_CONFIG_FILES([Makefile
- Open-ILS/examples/Makefile
- Open-ILS/src/Makefile
- Open-ILS/src/apachemods/Makefile
- Open-ILS/src/c-apps/Makefile
- Open-ILS/src/extras/Makefile
- Open-ILS/src/java/Makefile
- Open-ILS/src/python/Makefile
- Open-ILS/xul/staff_client/Makefile
- Open-ILS/src/extras/eg_config], [if test -e "./Open-ILS/src/extras/eg_config"; then chmod 755 Open-ILS/src/extras/eg_config; fi])
+ Open-ILS/src/Makefile
+ Open-ILS/web/Makefile
+ Open-ILS/xul/staff_client/Makefile
+ Open-ILS/src/extras/eg_config], [if test -e "./Open-ILS/src/extras/eg_config"; then chmod 755 Open-ILS/src/extras/eg_config; fi])
AC_OUTPUT
#-------------------------------------------------
else
AC_MSG_RESULT([Evergreen Core: no])
fi
+if test "$build_apachemods" = "true" ; then
+ AC_MSG_RESULT([Evergreen Apache module: yes])
+else
+ AC_MSG_RESULT([Evergreen Apache module: no])
+fi
if test "$openils_web" = "true" ; then
AC_MSG_RESULT([Evergreen Web: yes])
else