[open-ils-commits] r14030 - in trunk: . Open-ILS/src Open-ILS/src/apachemods Open-ILS/xul/staff_client (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 15 23:34:41 EDT 2009


Author: dbs
Date: 2009-09-15 23:34:38 -0400 (Tue, 15 Sep 2009)
New Revision: 14030

Modified:
   trunk/Makefile.am
   trunk/Open-ILS/src/Makefile.am
   trunk/Open-ILS/src/apachemods/Makefile.am
   trunk/Open-ILS/xul/staff_client/Makefile.am
   trunk/configure.ac
Log:
Make building & installing the core components of Evergreen optional.

For now, this will be of most interest to those interested in building only
the staff client, say, on platforms where many of the dependencies of the
other components of Evergreen are not readily available. If you disable the
core components using configure, then dependency checking for those core
components is skipped and the staff client will be build and installed to
the desired location.

For example:

./autogen.sh
./configure --prefix=/openils --disable-core --disable-apache-modules
sudo make install

... will result in the Evergreen Web files, reporter, and staff client
being built and their respective server components installed in
/openils/var/web/...


Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2009-09-15 20:24:27 UTC (rev 14029)
+++ trunk/Makefile.am	2009-09-16 03:34:38 UTC (rev 14030)
@@ -38,5 +38,5 @@
 export OPENSRF_HEADERS = @OPENSRF_HEADERS@
 export OPENSRF_LIBS = @OPENSRF_LIBS@
 
-SUBDIRS = Open-ILS/src
+SUBDIRS = Open-ILS/src Open-ILS/web Open-ILS/xul/staff_client
 

Modified: trunk/Open-ILS/src/Makefile.am
===================================================================
--- trunk/Open-ILS/src/Makefile.am	2009-09-15 20:24:27 UTC (rev 14029)
+++ trunk/Open-ILS/src/Makefile.am	2009-09-16 03:34:38 UTC (rev 14030)
@@ -31,12 +31,6 @@
 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
 
@@ -51,6 +45,13 @@
 
 # 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
 #----------------------------
@@ -65,13 +66,6 @@
 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 \
@@ -104,37 +98,13 @@
 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
 #---------------------
@@ -149,15 +119,6 @@
 endif
 
 #------------------------------
-# Build ILS XUL CLIENT/SERVER
-#------------------------------
-
-if BUILDILSCLIENT
-OILSCLIENT_DIRS = ../xul/staff_client
-OILSSERVER_INST = server-xul
-endif
-
-#------------------------------
 # Build EVERGREEN PYTHON
 #------------------------------
 
@@ -176,9 +137,9 @@
 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
 
@@ -190,15 +151,13 @@
 
 # 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	
@@ -232,61 +191,6 @@
 	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'

Modified: trunk/Open-ILS/src/apachemods/Makefile.am
===================================================================
--- trunk/Open-ILS/src/apachemods/Makefile.am	2009-09-15 20:24:27 UTC (rev 14029)
+++ trunk/Open-ILS/src/apachemods/Makefile.am	2009-09-16 03:34:38 UTC (rev 14030)
@@ -7,9 +7,13 @@
 AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I at abs_top_srcdir@/Open-ILS/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -I$(OPENSRF_HEADERS)
 AM_LDFLAGS = -L$(LIBDIR) -L$(OPENSRF_LIBS)
 
-	
+if BUILDAPACHEMODS
+OILSAPACHEINST = apachemods
+endif
 
-install-exec-local:
+install-exec-local: $(OILSAPACHEINST)
+
+apachemods:
 	$(APXS2) -c $(AM_LDFLAGS) -lxml2 -lopensrf -lxslt -lexpat $(AM_CFLAGS) @srcdir@/mod_xmlent.c
 	$(APXS2) -i -a @srcdir@/mod_xmlent.la
 

Modified: trunk/Open-ILS/xul/staff_client/Makefile.am
===================================================================
--- trunk/Open-ILS/xul/staff_client/Makefile.am	2009-09-15 20:24:27 UTC (rev 14029)
+++ trunk/Open-ILS/xul/staff_client/Makefile.am	2009-09-16 03:34:38 UTC (rev 14030)
@@ -4,12 +4,21 @@
 #---------------------------------------------------------
 
 export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID)
+
 OPENSRF_JSLIBS = "$(OPENSRF_LIBS)/javascript"
 CHROME_LOCALES = $$(ls -1 chrome/locale)
 SKIN_CSS = $$(ls -1 server/skin/*css | sed -e "s/.css/_custom.css/")
 
-install-exec-local: build
+#------------------------------
+# Build ILS XUL CLIENT/SERVER
+#------------------------------
 
+if BUILDILSCLIENT
+OILSSERVER_INST = server-xul
+endif
+
+install-exec-local: $(OILSSERVER_INST)
+
 build: build_dir chrome2remote localize_manifest generated custom_skins open-ils stamp 
 	@echo To test the staff client:
 	@echo "  cd build/"
@@ -75,3 +84,12 @@
 	@for skin in $(SKIN_CSS); do \
 		if [ ! -f "$$skin" ]; then ( touch build/"$$skin" ); fi \
 	done;
+
+server-xul: build
+	@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}/"

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2009-09-15 20:24:27 UTC (rev 14029)
+++ trunk/configure.ac	2009-09-16 03:34:38 UTC (rev 14030)
@@ -30,6 +30,7 @@
 # Checks for programs.
 #-----------------------------------
 
+
 AC_PROG_LIBTOOL
 AC_PROG_CC
 AC_PROG_INSTALL
@@ -80,6 +81,18 @@
 
 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],
@@ -134,56 +147,45 @@
 
 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_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_CHECK_PROG([ASPELL],aspell,yes,no)
-if test $ASPELL = "no"; then
-	AC_MSG_ERROR([*** aspell not found, aborting])
-fi
+# 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_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
-
-
-#-----------------------------------
-# Set install path variables 
-#-----------------------------------
-
 AC_ARG_WITH([tmp],
 [  --with-tmp=path             location of the Evergreen temporary directory (default is /tmp) ],
 [TMP=${withval}],
 [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],
@@ -198,95 +200,129 @@
 [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])
+if test "x$openils_core" = "xtrue"; then
 
-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_CHECK_PROG([MEMCACHED],memcached,yes,no)
+	if test $MEMCACHED = "no"; then
+		AC_MSG_ERROR([*** memcached not found, aborting])
+	fi
 
-#------------------------------------
-# Checks for libraries. 
-#------------------------------------
+	AC_CHECK_PROG([ASPELL],aspell,yes,no)
+	if test $ASPELL = "no"; then
+		AC_MSG_ERROR([*** aspell not found, aborting])
+	fi
 
-# Check for the existence of libraries in non-standard locations
+	AC_CHECK_PROG([CPAN],cpan,yes,no)
+	if test $CPAN = "no"; then
+		AC_MSG_ERROR([*** cpan not found, aborting])
+	fi
 
-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
+	AC_CHECK_PROG([YAZ],yaz-config,yes,no)
+	if test $YAZ = "no"; then
+		AC_MSG_ERROR([*** yaz not found, aborting])
+	fi
 
-# Check for the rest of the libraries
+	AC_CHECK_PROG([PERL],perl,yes,no)
+	if test $PERL = "no"; then 
+		AC_MSG_ERROR([*** perl not found, aborting])
+	fi
 
-#check for dynamic linking functions
-AC_CHECK_LIB(dl,dlopen)
+	#------------------------------------
+	# Checks for libraries. 
+	#------------------------------------
 
-#check for the libdbi library
-AC_CHECK_LIB(dbi,dbi_initialize)
+	# Check for the existence of libraries in non-standard locations
 
-#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_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
 
-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))
+	# Check for the rest of the libraries
 
+	#check for dynamic linking functions
+	AC_CHECK_LIB(dl,dlopen)
 
-#------------------------------------
-# Checks for header files.
-#------------------------------------
+	#check for the libdbi library
+	AC_CHECK_LIB(dbi,dbi_initialize)
 
-AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h langinfo.h locale.h stdlib.h string.h unistd.h])
+	#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?")])
 
-#-------------------------------------------------------------------
-# Checks for typedefs, structures, and compiler characteristics.
-#-------------------------------------------------------------------
+	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))
 
-AC_C_CONST
-AC_TYPE_SIZE_T
-AC_STRUCT_TM
-AC_HEADER_STDBOOL
 
-#-------------------------------------------------------------------
-# Checks for library functions.
-#-------------------------------------------------------------------
+	#------------------------------------
+	# Checks for header files.
+	#------------------------------------
 
-AC_FUNC_STRFTIME
-AC_FUNC_STRTOD
-AC_CHECK_FUNCS([localtime_r memset nl_langinfo setlocale strcasecmp strchr strdup strerror strncasecmp])
+	AC_HEADER_STDC
+	AC_CHECK_HEADERS([fcntl.h langinfo.h locale.h stdlib.h string.h unistd.h])
 
-#----------------------------
-# Create Makefiles/Output
-#----------------------------
+	#-------------------------------------------------------------------
+	# 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
+
+if test "x$build_apachemods" = "xtrue"; then
+
+	#-----------------------------------
+	# Set install path variables 
+	#-----------------------------------
+
+	#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  
+
+	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
 
 #-------------------------------------------------
@@ -303,6 +339,11 @@
 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



More information about the open-ils-commits mailing list