summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-04-21 15:27:24 -0700
committerArnaud Fontaine <arnau@debian.org>2010-11-14 20:12:09 +0900
commit88bec69a155dc8356cec00c3c75700368f790674 (patch)
tree757fd0a8a03eadd227656f5e8f48f1d0859328e7
parente4b1174de20765a1140b725350650feed3392528 (diff)
downloadutil-keysyms-88bec69a155dc8356cec00c3c75700368f790674.tar.gz
Make sure m4 supports -I flag, if not, try finding gnu m4
Solaris m4 does not support -I flag, but gnu m4 is included in recent Solaris & OpenSolaris releases (and must already be installed on any machine that runs autoconf to generate configure scripts) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r--configure.ac20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 4671e6b..c5f79f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,9 +3,25 @@ AC_INIT([xcb-util],0.3.4,[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AC_CHECK_PROGS(M4, m4, [no])
+AC_CHECK_PROGS(M4, [m4 gm4], [no])
+if test $M4 != "no" ; then
+ AC_MSG_CHECKING([if $M4 supports -I])
+ if $M4 -I. /dev/null > /dev/null 2>&1 ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ # Try finding the gnu version
+ AC_CHECK_PROGS(GM4, gm4, [no])
+ if test $GM4 = "no" ; then
+ AC_PATH_PROGS(GNUM4, m4, [no], [/usr/gnu/bin])
+ M4="$GNUM4"
+ else
+ M4="$GM4"
+ fi
+ fi
+fi
if test $M4 = "no"; then
- AC_MSG_ERROR([Can't find m4, please install it and try again])
+ AC_MSG_ERROR([Can't find usable m4, please install it and try again])
fi
AC_CHECK_PROGS(GPERF, gperf, [no])
if test $GPERF = "no"; then