Merge branch 'master' of git://git.evergreen-ils.org/OpenSRF
[opensrf-equinox.git] / configure.ac
index d23354d..3169958 100644 (file)
 # Initialization
 #-------------------------------
 
+libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
+libtoolize: and rerunning libtoolize and aclocal.
+libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
+
+
 export PATH=${PATH}:/usr/sbin
 AC_PREREQ(2.59)
 
@@ -26,12 +31,12 @@ AC_PREREQ(2.59)
 m4_include([version.m4])
 
 # Version number gets turned into @PACKAGE_VERSION@
-AC_INIT([OpenSRF],m4_defn([VERSION_NUMBER]),[open-ils-dev@list.georgialibraries.org])
-AM_INIT_AUTOMAKE([OpenSRF], m4_defn([VERSION_NUMBER]))
+AC_INIT([OpenSRF], [VERSION_NUMBER])
+AC_CONFIG_SRCDIR([configure.ac])
+AM_INIT_AUTOMAKE
+AC_CONFIG_MACRO_DIRS([m4])
 
 AC_REVISION($Revision: 0.1 $)
-AC_CONFIG_SRCDIR([configure.ac])
-AC_PREFIX_DEFAULT([/opensrf])
 
 # Enable $prefix to resolve to a reasonable value in substitutions in
 # scripts if no explict value was passed in to configure
@@ -203,6 +208,18 @@ if ! test -d "$APR_HEADERS"; then
 fi
 AC_SUBST([APR_HEADERS])
 
+AC_ARG_WITH([perlbase],
+[  --with-perlbase=path             base location to install Perl modules (default based on Config.pm)],
+[PERL_BASE=${withval}],
+[PERL_BASE=x])
+AC_SUBST([PERL_BASE])
+
+AC_ARG_WITH([websockets-port],
+[  --with-websockets-port=path             WebSockets port to use (default is 7682)],
+[WS_PORT=${withval}],
+[WS_PORT=7682])
+AC_SUBST([WS_PORT])
+
 # The following Apache version detection code is adapted from
 # http://www.gnu.org/software/autoconf-archive/ax_prog_apache.html
 # licensed under version 2 of the GNU General Public License, or
@@ -213,9 +230,18 @@ AC_SUBST([APR_HEADERS])
 # Collect apache version number. If for nothing else, this
 # guarantees that httpd is a working apache executable.
 #
-changequote(<<, >>)dnl
 APACHE=`$APXS2 -q progname`
-APACHE_READABLE_VERSION=`$APACHE -v | grep 'Server version' | sed -e 's;.*Apache/\([0-9\.][0-9\.]*\).*;\1;'`
+AC_PATH_PROG(APACHE_PATH, [$APACHE], [])
+if test -z "$APACHE_PATH" ; then
+       for i in /usr/bin /usr/sbin /usr/local/apache/bin /usr/local/apache2/bin ; do
+        if test -x "$i/$APACHE"; then
+            APACHE_PATH="$i/$APACHE"
+            break
+        fi
+       done
+fi
+changequote(<<, >>)dnl
+APACHE_READABLE_VERSION=`$APACHE_PATH -v | grep 'Server version' | sed -e 's;.*Apache/\([0-9\.][0-9\.]*\).*;\1;'`
 changequote([, ])dnl
 APACHE_VERSION=`echo $APACHE_READABLE_VERSION | sed -e 's/\.//g'`
 if test -z "$APACHE_VERSION" ; then
@@ -247,12 +273,12 @@ IFS="${IFS}:"
 
 for dir in $EXTRA_USER_INCLUDES; do
        if test -d "$dir"; then
-         INCLUDES="$INCLUDES -I$dir"
+         AM_CPPFLAGS="$AM_CPPFLAGS -I$dir"
        else
          AC_MSG_WARN([*** Include directory $dir does not exist.])
        fi
 done
-AC_SUBST(INCLUDES)
+AC_SUBST(AM_CPPFLAGS)
 
 for dir in $EXTRA_USER_LIBRARIES; do
        if test -d "$dir"; then
@@ -359,16 +385,18 @@ if test "x$OSRF_INSTALL_CORE" = "xtrue"; then
                         examples/multisession-test.pl
                         src/c-apps/Makefile
                         src/gateway/Makefile
+                        src/javascript/opensrf_ws.js
+                        src/javascript/opensrf_ws_shared.js
                         src/libopensrf/Makefile
                         src/perl/Makefile
                         src/ports/strn_compat/Makefile
                         src/python/opensrf.py
                         src/router/Makefile
                         src/srfsh/Makefile
+                        src/websocket-stdio/Makefile
              tests/Makefile
                         bin/opensrf-perl.pl
-                        bin/osrf_config
-                        bin/osrf_ctl.sh])
+                        bin/osrf_config])
 fi
 
 AC_OUTPUT