From f1c1d0b0de3b170cc1cc6ec0b2b1800c9e01177c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 22 Jan 2013 09:52:52 -0500 Subject: [PATCH] Provide some level of support for legacy install locations If someone really wants to keep OpenSRF and Evergreen installed in /openils, then enable the configure script to find the osrf_config script and add the library location to the test to prevent it from failing. Signed-off-by: Dan Scott Signed-off-by: Mike Rylander --- configure.ac | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 87698eb181..fab6180e0c 100644 --- a/configure.ac +++ b/configure.ac @@ -181,18 +181,24 @@ 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`]) +[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`]) +[OPENSRF_LIBS=`$OSRF_CONFIG --libdir`]) AC_SUBST([OPENSRF_LIBS]) AC_ARG_WITH([tmp], @@ -294,6 +300,11 @@ if test "x$openils_core" = "xtrue"; then AC_CHECK_LIB([expat], [main], [], AC_MSG_ERROR(*** OpenILS requires libexpat)) AC_CHECK_LIB([ncurses], [main], [], AC_MSG_ERROR(*** OpenILS requires libncurses)) + + # IF the OpenSRF libs are installed in a non-standard location, such as + # /openils/lib, the compilation test will fail. Support that case. + LDFLAGS="-L$OPENSRF_LIBS" + AC_CHECK_LIB([opensrf], [osrfMessageFree], [], AC_MSG_ERROR(*** OpenILS requires libopensrf)) AC_CHECK_LIB([readline], [main], [], AC_MSG_ERROR(*** OpenILS requires libreadline)) AC_CHECK_LIB([xml2], [main], [], AC_MSG_ERROR(*** OpenILS requires libxml2)) -- 2.43.2