[open-ils-commits] r15342 - trunk (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jan 19 15:38:22 EST 2010


Author: dbs
Date: 2010-01-19 15:38:17 -0500 (Tue, 19 Jan 2010)
New Revision: 15342

Modified:
   trunk/configure.ac
Log:
Start making autoconf more tolerant of other distributions (looking at you, Fedora)


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2010-01-19 19:34:46 UTC (rev 15341)
+++ trunk/configure.ac	2010-01-19 20:38:17 UTC (rev 15342)
@@ -174,6 +174,19 @@
 [  --with-apxs=path            location of the apxs Apache configuration tool (default is /usr/bin/apxs2)],
 [APXS2=${withval}],
 [APXS2=/usr/bin/apxs2])
+
+# If the passed in value doesn't work, try some reasonable defaults
+# Fedora puts the file in /usr/sbin/apxs, for example
+if ! test -x "$APXS2"; then
+	for i in /usr/bin /usr/sbin /usr/local/apache/bin /usr/local/apache2/bin ; do
+		for j in apxs apxs2 ; do
+			if test -x "$i/$j"; then
+				APXS2="$i/$j"
+				break
+			fi
+		done
+	done
+fi
 AC_SUBST([APXS2])
 
 AC_ARG_WITH([apache],
@@ -195,9 +208,20 @@
 AC_SUBST([LIBXML2_HEADERS])
 
 AC_ARG_WITH([dbi],
-[  --with-dbi=path             location of the libdbi libraries (default is /usr/local/lib/dbd)],
+[  --with-dbi=path             location of the libdbi driver libraries (default is /usr/local/lib/dbd)],
 [DBI_LIBS=${withval}],
 [DBI_LIBS=/usr/local/lib/dbd/])
+
+# If the passed in value doesn't work, fall back to reasonable defaults
+# Distributions are starting to package a good version of libdbi / libdbd
+if ! test -d "$DBI_LIBS"; then
+	for i in /usr/lib/dbd/ /usr/local/lib/dbd/ ; do
+		if test -d "$i"; then
+			DBI_LIBS="$i"
+			break
+		fi
+	done
+fi
 AC_SUBST([DBI_LIBS])
 
 if test "x$openils_core" = "xtrue"; then
@@ -312,7 +336,7 @@
 	if test -x "${APXS2}"; then
 	AC_MSG_RESULT([yes])
 	else
-	AC_MSG_ERROR([*** apxs not found, aborting])
+	AC_MSG_ERROR([*** apxs not found in ${APXS2}, aborting])
 	fi  
 
 	AC_CONFIG_FILES([Open-ILS/src/apachemods/Makefile])



More information about the open-ils-commits mailing list