LP1821382 Add Items to Bucket menu action
[evergreen-equinox.git] / configure.ac
index 48bfa39..dacb5a3 100644 (file)
@@ -182,26 +182,6 @@ AM_CONDITIONAL([BUILDEGPYTHON], [test x$EG_PYTHON_INSTALL = xtrue])
 #-----------------------------------
 # Check for dependencies 
 #-----------------------------------
-AC_PATH_PROG([OSRF_CONFIG], [osrf_config])
-if test "x$OSRF_CONFIG" == "x"; then
-    AC_MSG_ERROR([Could not find osrf_config.
-    Ensure OpenSRF is installed and that the PATH environment variable includes
-    the OpenSRF executables. For example: PATH=\$PATH:/openils/bin ./configure])
-fi
-
-AC_ARG_WITH([opensrf-headers],
-[  --with-opensrf-headers=path location of the OpenSRF header files],
-[OPENSRF_HEADERS=${withval}],
-[OPENSRF_HEADERS=`$OSRF_CONFIG --includedir`])
-AC_SUBST([OPENSRF_HEADERS])
-
-# We need this for JavaScript
-AC_ARG_WITH([opensrf-libs],
-[  --with-opensrf-libs=path    location of the OpenSRF libraries],
-[OPENSRF_LIBS=${withval}],
-[OPENSRF_LIBS=`$OSRF_CONFIG --libdir`])
-AC_SUBST([OPENSRF_LIBS])
-
 AC_ARG_WITH([tmp],
 [  --with-tmp=path             location of the Evergreen temporary directory (default is /tmp) ],
 [TMP=${withval}],
@@ -236,7 +216,13 @@ AC_SUBST([LIBXML2_HEADERS])
 AC_ARG_WITH([dbi],
 [  --with-dbi=path             location of the libdbi driver libraries (default is /usr/lib/x86_64-linux-gnu/dbd/)],
 [DBI_LIBS=${withval}],
-[DBI_LIBS=/usr/local/lib/dbd/])
+[DBI_LIBS=/usr/lib/x86_64-linux-gnu/dbd/])
+
+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])
 
 # If the passed in value doesn't work, fall back to reasonable defaults
 # Distributions are starting to package a good version of libdbi / libdbd
@@ -250,8 +236,30 @@ if ! test -d "$DBI_LIBS"; then
 fi
 AC_SUBST([DBI_LIBS])
 
+AM_CONDITIONAL(CHECK_TESTS, test x$enable_tests = xyes)
+
 if test "x$openils_core" = "xtrue"; then
 
+    AC_PATH_PROG([OSRF_CONFIG], [osrf_config])
+    if test "x$OSRF_CONFIG" == "x"; then
+        AC_MSG_ERROR([Could not find osrf_config.
+        Ensure OpenSRF is installed and that the PATH environment variable includes
+        the OpenSRF executables. For example: PATH=\$PATH:/openils/bin ./configure])
+    fi
+
+    AC_ARG_WITH([opensrf-headers],
+    [  --with-opensrf-headers=path location of the OpenSRF header files],
+    [OPENSRF_HEADERS=${withval}],
+    [OPENSRF_HEADERS=`$OSRF_CONFIG --includedir`])
+    AC_SUBST([OPENSRF_HEADERS])
+
+    # We need this for JavaScript
+    AC_ARG_WITH([opensrf-libs],
+    [  --with-opensrf-libs=path    location of the OpenSRF libraries],
+    [OPENSRF_LIBS=${withval}],
+    [OPENSRF_LIBS=`$OSRF_CONFIG --libdir`])
+    AC_SUBST([OPENSRF_LIBS])
+
     AC_CHECK_PROG([MEMCACHED],memcached,yes,no)
     if test $MEMCACHED = "no"; then
         AC_MSG_ERROR([*** memcached not found, aborting])
@@ -311,6 +319,8 @@ if test "x$openils_core" = "xtrue"; then
     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([pq], [main], [], AC_MSG_ERROR(*** OpenILS requires libpq))
+    PKG_CHECK_MODULES(pcre, libpcre >= 3.0.0)
+
 
     #------------------------------------
     # Checks for header files.
@@ -336,6 +346,15 @@ if test "x$openils_core" = "xtrue"; then
     AC_FUNC_STRTOD
     AC_CHECK_FUNCS([localtime_r memset nl_langinfo setlocale strcasecmp strchr strdup strerror strncasecmp])
 
+    #---------------------------------
+    # Check for unit test framework.
+    #---------------------------------
+    PKG_CHECK_MODULES([CHECK], [check >= 0.9.0], [enable_tests=yes],
+                      [enable_tests=no])
+    if test "x$enable_tests" = "xno"; then
+        AC_MSG_WARN(Check unit testing framework not found.)
+    fi
+
     #----------------------------
     # Create Makefiles/Output
     #----------------------------