X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=f8435bf36e778e92b48318993891a7ae54d44c29;hb=e940363a7b70bc3373ebebeff5fe5075b5b141ec;hp=797380915353814b4e27c8952d89d358cd3054d8;hpb=7c842eea8407b193bbbf62b0ad1675e141edd649;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index 7973809..f8435bf 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.83 2001/09/20 14:08:13 sewardj Exp $ +dnl $Id: aclocal.m4,v 1.85 2001/10/13 20:26:13 sof Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -413,6 +413,29 @@ rm -fr conftest* ]) dnl +dnl Getting at the right version of 'find' +dnl (i.e., not the MS util on a Win32 box). +dnl +AC_DEFUN(FPTOOLS_FIND_FIND, +[ +AC_PATH_PROG(Find2Cmd, find) +$Find2Cmd --version > conftest.out 2>&1 +if grep "FIND: Parameter format" conftest.out >/dev/null 2>&1 ; then + # Encountered MS' find utility, which is not what we're after. + # + # HACK - AC_CHECK_PROG is useful here in that does let you reject + # an (absolute) entry in the path (Find2Cmd). It is not so useful + # in that it doesn't let you (AFAIU) set VARIABLE equal to the + # absolute path eventually found. So, hack around this by inspecting + # what variables hold the abs. path & use them directly. + AC_CHECK_PROG(FindCmd,find,`echo $ac_dir/$ac_word`,find,,$Find2Cmd) +else +FindCmd=$Find2Cmd +AC_SUBST(FindCmd) +fi +]) + +dnl dnl FPTOOLS_NOCACHE_CHECK prints a message, then sets the dnl values of the second argument to the result of running dnl the commands given by the third. It does not cache its @@ -1166,8 +1189,8 @@ AC_CACHE_CHECK([whether $CC accepts $1], [ac_cv_cc_$2], CFLAGS="$save_CFLAGS" ]) if test "$ac_cv_cc_$2"x = "yesx"; then - $2=$extra_flag; + $2=$1; else - $2=$extra_flag; + $2=""; fi; ])