AMPI #952: update ROMIO to MPICH2-1.4.1p1
[charm.git] / src / libs / ck-libs / ampi / romio / confdb / aclocal_bugfix.m4
blobf580d3919adde2b48c8a8b11522c5169eb713caf
1 dnl This internal macro fails to work properly with OTHER internal macros.
2 dnl Basically, if the prologue is [], then no message should be generated.
3 dnl This macro is in autoconf 2.52
4 m4_define([AC_LANG_PROGRAM(Fortran 77)],
5 [m4_if([$1],[[[]]],,[m4_ifval([$1],
6        [m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])])dnl
7       program main
8 $2
9       end])
12 dnl/*D
13 dnl PAC_PROG_CHECK_INSTALL_WORKS - Check whether the install program in INSTALL
14 dnl works.
15 dnl
16 dnl Synopsis:
17 dnl PAC_PROG_CHECK_INSTALL_WORKS
18 dnl
19 dnl Output Effect:
20 dnl   Sets the variable 'INSTALL' to the value of 'ac_sh_install' if 
21 dnl   a file cannot be installed into a local directory with the 'INSTALL'
22 dnl   program
23 dnl
24 dnl Notes:
25 dnl   The 'AC_PROG_INSTALL' scripts tries to avoid broken versions of 
26 dnl   install by avoiding directories such as '/usr/sbin' where some 
27 dnl   systems are known to have bad versions of 'install'.  Unfortunately, 
28 dnl   this is exactly the sort of test-on-name instead of test-on-capability
29 dnl   that 'autoconf' is meant to eliminate.  The test in this script
30 dnl   is very simple but has been adequate for working around problems 
31 dnl   on Solaris, where the '/usr/sbin/install' program (known by 
32 dnl   autoconf to be bad because it is in /usr/sbin) is also reached by a 
33 dnl   soft link through /bin, which autoconf believes is good.
34 dnl
35 dnl   No variables are cached to ensure that we do not make a mistake in 
36 dnl   our choice of install program.
37 dnl
38 dnl   The Solaris configure requires the directory name to immediately
39 dnl   follow the '-c' argument, rather than the more common 
40 dnl.vb
41 dnl      args sourcefiles destination-dir
42 dnl.ve
43 dnl D*/
44 AC_DEFUN([PAC_PROG_CHECK_INSTALL_WORKS],[
45 if test -z "$INSTALL" ; then
46     AC_MSG_RESULT([No install program available])
47 else
48     # first make any "confdb/install-sh -c" into an absolute path
49     # this is a hack, but it's still much cleaner than anything else I could
50     # come up with (see tt#1007) [goodell@]
51     AS_CASE(["$INSTALL"],
52             [/*],[:],
53             [*install-sh*],[INSTALL="$master_top_srcdir/$INSTALL"])
55     # Check that this install really works
56     rm -f conftest
57     echo "Test file" > conftest
58     if test ! -d .conftest ; then mkdir .conftest ; fi
59     AC_MSG_CHECKING([whether install works])
60     if $INSTALL conftest .conftest >/dev/null 2>&1 ; then
61         installOk=yes
62     else
63         installOk=no
64     fi
65     rm -rf .conftest conftest
66     AC_MSG_RESULT($installOk)
67     if test "$installOk" = no ; then
68         if test -n "$ac_install_sh" ; then
69             INSTALL=$ac_install_sh
70         else
71             AC_MSG_ERROR([Unable to find working install])
72         fi
73     fi