From 1a04a0eae453a2c61f1ccad7af51dcf2c1d50280 Mon Sep 17 00:00:00 2001 From: dbs Date: Wed, 16 Sep 2009 03:34:38 +0000 Subject: [PATCH 1/1] 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/... git-svn-id: svn://svn.open-ils.org/ILS/trunk@14030 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Makefile.am | 2 +- Open-ILS/src/Makefile.am | 122 ++---------- Open-ILS/src/apachemods/Makefile.am | 8 +- Open-ILS/xul/staff_client/Makefile.am | 20 +- configure.ac | 273 +++++++++++++++----------- 5 files changed, 196 insertions(+), 229 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5b0cf53693..e669bc6441 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,5 +38,5 @@ export DBI_LIBS = @DBI_LIBS@ 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 diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index a879f7d83c..4582e2be5b 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -31,12 +31,6 @@ penaltyrulesdir=@localstatedir@/penalty 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 @@ autojsbinscripts = @srcdir@/extras/fieldmapper.pl \ # 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 @@ OILSCORE_INST = ilscore-install 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 @@ catalogscript_SCRIPTS = $(jsbackend)/catalog/biblio_descriptor.js \ 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 #--------------------- @@ -148,15 +118,6 @@ reporter_data = @srcdir@/reporter/report-fail \ @srcdir@/reporter/report-success 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 @@ endif 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 @@ oilsinclude_HEADERS = $(headsdir)/idl_fieldmapper.h $(headsdir)/oils_constants.h # 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 @@ ilscore-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' diff --git a/Open-ILS/src/apachemods/Makefile.am b/Open-ILS/src/apachemods/Makefile.am index 0a6ea3f069..07eecfa31a 100644 --- a/Open-ILS/src/apachemods/Makefile.am +++ b/Open-ILS/src/apachemods/Makefile.am @@ -7,9 +7,13 @@ AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@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 diff --git a/Open-ILS/xul/staff_client/Makefile.am b/Open-ILS/xul/staff_client/Makefile.am index d04b644dad..e50540d725 100644 --- a/Open-ILS/xul/staff_client/Makefile.am +++ b/Open-ILS/xul/staff_client/Makefile.am @@ -4,11 +4,20 @@ #--------------------------------------------------------- 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: @@ -75,3 +84,12 @@ custom_skins: @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}/" diff --git a/configure.ac b/configure.ac index b74d27030c..229e4d721c 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ AC_SUBST([abs_top_builddir]) # Checks for programs. #----------------------------------- + AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_INSTALL @@ -80,6 +81,18 @@ esac], 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,41 +147,22 @@ esac], 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) ], @@ -176,14 +170,22 @@ AC_ARG_WITH([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], @@ -198,95 +200,129 @@ AC_ARG_WITH([dbi], [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 #------------------------------------------------- @@ -303,6 +339,11 @@ if test "$openils_core" = "true" ; then 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 -- 2.43.2