Commits

Martin Albrecht committed 28e11a0

do not fail if realpath is not installed

Comments (0)

Files changed (2)

m4/ax_guess_path_header.m4

       fi
     }
 
+    have_realpath=`which realpath`
+
     cw_headername_uppercase=`echo "m4_toupper([$1])" | sed -e 's/[[^A-Z]]/_/g'`
     AC_CACHE_CHECK([if we can find [$1]], [cw_cv_"$[]cw_headername_uppercase"_path],
     [
       cw_header_path=`eval cw_search_header_path [$1] $CPPFLAGS $CFLAGS`
       if test -n "$cw_header_path"; then
-        eval cw_cv_"$cw_headername_uppercase"_path=`realpath -s "$cw_header_path"`
+        if test "x$have_realpath" != "x"; then
+            eval cw_cv_"$cw_headername_uppercase"_path=`realpath -s "$cw_header_path"`
+        else
+            eval cw_cv_"$cw_headername_uppercase"_path="$cw_header_path"
+        fi
       else
         eval cw_cv_"$cw_headername_uppercase"_path="no"
       fi

m4/ax_guess_path_lib.m4

       fi
     }
 
+    have_realpath=`which realpath`
+
     cw_libname_uppercase="m4_toupper([$1])"
     AC_CACHE_CHECK([if we can find lib[$1].so], [cw_cv_lib"$[]cw_libname_uppercase"_path],
     [
       cw_library_path=`eval cw_search_library_path [$1] $LDFLAGS`
       if test -n "$cw_library_path"; then
-        eval cw_cv_lib"$cw_libname_uppercase"_path=`realpath -s "$cw_library_path"`
+        if test "x$have_realpath" != "x"; then
+           eval cw_cv_lib"$cw_libname_uppercase"_path=`realpath -s "$cw_library_path"`
+         else
+           eval cw_cv_lib"$cw_libname_uppercase"_path="$cw_library_path"
+        fi
       else
         eval cw_cv_lib"$cw_libname_uppercase"_path="no"
       fi