handle filesystems where lowercase(file)==file more gracefully
[swftools.git] / m4 / lowercase.m4
diff --git a/m4/lowercase.m4 b/m4/lowercase.m4
new file mode 100644 (file)
index 0000000..0d9cd9a
--- /dev/null
@@ -0,0 +1,15 @@
+AC_DEFUN([RFX_CHECK_LOWERCASE_UPPERCASE],
+[
+AC_MSG_CHECKING([whether the filesystem normalizes file names])
+
+echo test1 > __abcdefghijklmnopqrstuvwxyz.txt
+echo test2 > __ABCDEFGHIJKLMNOPQRSTUVWXYZ.txt
+if test `cat __abcdefghijklmnopqrstuvwxyz.txt` = "test2";then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE([LOWERCASE_UPPERCASE], [1], [Define if the file system is case invariant])
+else
+    AC_MSG_RESULT(no)
+fi
+])
+
+