[PATCH 1/3] configure: check platform beforehand

Felipe Contreras felipe.contreras at gmail.com
Sat Jun 5 04:05:13 PDT 2010


Will be needed in next patches.

Signed-off-by: Felipe Contreras <felipe.contreras at gmail.com>
---
 configure |   62 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/configure b/configure
index c86a227..1eb4785 100755
--- a/configure
+++ b/configure
@@ -195,6 +195,37 @@ EOF
 
 errors=0
 
+libdir_in_ldconfig=0
+
+printf "Checking which platform we are on... "
+if [ `uname` = "Darwin" ] ; then
+    printf "Mac OS X.\n"
+    platform=MACOSX
+    linker_resolves_library_dependencies=0
+elif [ `uname` = "SunOS" ] ; then
+    printf "Solaris.\n"
+    platform=SOLARIS
+    linker_resolves_library_dependencies=0
+elif [ `uname` = "Linux" ] ; then
+    printf "Linux\n"
+    platform=LINUX
+    linker_resolves_library_dependencies=1
+    ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')
+    for path in $ldconfig_paths; do
+	echo "Checking $path compared to $libdir_expanded"
+	if [ "$path" = "$libdir_expanded" ]; then
+	    libdir_in_ldconfig=1
+	fi
+    done
+else
+    printf "Unknown.\n"
+    cat <<EOF
+
+*** Warning: Unknown platform. Notmuch might or might not build correctly.
+
+EOF
+fi
+
 if pkg-config --version > /dev/null 2>&1; then
     have_pkg_config=1
 else
@@ -272,37 +303,6 @@ else
     have_emacs=0
 fi
 
-libdir_in_ldconfig=0
-
-printf "Checking which platform we are on... "
-if [ `uname` = "Darwin" ] ; then
-    printf "Mac OS X.\n"
-    platform=MACOSX
-    linker_resolves_library_dependencies=0
-elif [ `uname` = "SunOS" ] ; then
-    printf "Solaris.\n"
-    platform=SOLARIS
-    linker_resolves_library_dependencies=0
-elif [ `uname` = "Linux" ] ; then
-    printf "Linux\n"
-    platform=LINUX
-    linker_resolves_library_dependencies=1
-    ldconfig_paths=$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,^\(/.*\):\( (.*)\)\?$,\1,p')
-    for path in $ldconfig_paths; do
-	echo "Checking $path compared to $libdir_expanded"
-	if [ "$path" = "$libdir_expanded" ]; then
-	    libdir_in_ldconfig=1
-	fi
-    done
-else
-    printf "Unknown.\n"
-    cat <<EOF
-
-*** Warning: Unknown platform. Notmuch might or might not build correctly.
-
-EOF
-fi
-
 if [ $errors -gt 0 ]; then
     cat <<EOF
 
-- 
1.7.0.1



More information about the notmuch mailing list