summaryrefslogtreecommitdiff
path: root/m4/make-case.m4
diff options
context:
space:
mode:
authorStepan Kasal <skasal@redhat.com>2008-05-22 17:52:28 +0200
committerEric Blake <ebb9@byu.net>2008-08-26 12:40:23 -0600
commit16107833c24cf403c3a677d8a2066da36a363836 (patch)
treefcfe5e51ac07febcade4176ca2992f779824820b /m4/make-case.m4
parentf4df9b9b40517e5c23845a61837d6d0fcbe49081 (diff)
downloadautoconf-16107833c24cf403c3a677d8a2066da36a363836.tar.gz
Check for case sensitive make.
* m4/make-check.m4 (AC_PROG_MAKE_CASE_SENSITIVE): New macro,... * configure.ac: ... called here. * Makefile.am ($(abs_srcdir)/INSTALL, INSTALL): Return to... ($(srcdir)/INSTALL): ...this, but enclose the rule in "if MAKE_CASE_SENSITIVE". Signed-off-by: Stepan Kasal <skasal@redhat.com>
Diffstat (limited to 'm4/make-case.m4')
-rw-r--r--m4/make-case.m426
1 files changed, 26 insertions, 0 deletions
diff --git a/m4/make-case.m4 b/m4/make-case.m4
new file mode 100644
index 00000000..b23ccf97
--- /dev/null
+++ b/m4/make-case.m4
@@ -0,0 +1,26 @@
+# make-case.m4 serial 0
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# AC_PROG_MAKE_CASE_SENSITIVE
+# ---------------------------
+# Checks whether make is configured to be case insensitive; if yes,
+# sets AM_CONDITIONAL MAKE_CASE_SENSITIVE.
+#
+AC_DEFUN([AC_PROG_MAKE_CASE_SENSITIVE],
+[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_CACHE_CHECK([whether ${MAKE-make} is case sensitive],
+[ac_cv_prog_make_${ac_make}_case],
+[echo all: >conftest.make
+if ${MAKE-make} -f conftest.make ALL >/dev/null 2>&1; then
+ ac_res=no
+else
+ ac_res=yes
+fi
+eval ac_cv_prog_make_${ac_make}_case=$ac_res
+rm -f conftest.make])
+AM_CONDITIONAL([MAKE_CASE_SENSITIVE],
+ [eval test \$ac_cv_prog_make_${ac_make}_case = yes])
+])