Whamcloud - gitweb
b=17952
authorbrian <brian>
Thu, 19 Feb 2009 20:31:06 +0000 (20:31 +0000)
committerbrian <brian>
Thu, 19 Feb 2009 20:31:06 +0000 (20:31 +0000)
i=wangyb
i=adilger

Given that configure won't work with a relative pathname passed to the
--with-linux option, error out if the user provides a relative path.

build/autoconf/lustre-build-linux.m4

index 971aeb5..e0eafbd 100644 (file)
@@ -141,7 +141,13 @@ AC_DEFUN([LB_LINUX_PATH],
 AC_ARG_WITH([linux],
        AC_HELP_STRING([--with-linux=path],
                       [set path to Linux source (default=/usr/src/linux)]),
-       [LINUX=$with_linux],
+       [
+               if ! [[[ $with_linux = /* ]]]; then
+                       AC_MSG_ERROR([You must provide an absolute pathname to the --with-linux= option.])
+               else
+                       LINUX=$with_linux
+               fi
+       ],
        [LINUX=/usr/src/linux])
 AC_MSG_RESULT([$LINUX])
 AC_SUBST(LINUX)