1dnl This internal macro fails to work properly with OTHER internal macros. 2dnl Basically, if the prologue is [], then no message should be generated. 3dnl This macro is in autoconf 2.52 4m4_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]) 10 11 12dnl/*D 13dnl PAC_PROG_CHECK_INSTALL_WORKS - Check whether the install program in INSTALL 14dnl works. 15dnl 16dnl Synopsis: 17dnl PAC_PROG_CHECK_INSTALL_WORKS 18dnl 19dnl Output Effect: 20dnl Sets the variable 'INSTALL' to the value of 'ac_sh_install' if 21dnl a file cannot be installed into a local directory with the 'INSTALL' 22dnl program 23dnl 24dnl Notes: 25dnl The 'AC_PROG_INSTALL' scripts tries to avoid broken versions of 26dnl install by avoiding directories such as '/usr/sbin' where some 27dnl systems are known to have bad versions of 'install'. Unfortunately, 28dnl this is exactly the sort of test-on-name instead of test-on-capability 29dnl that 'autoconf' is meant to eliminate. The test in this script 30dnl is very simple but has been adequate for working around problems 31dnl on Solaris, where the '/usr/sbin/install' program (known by 32dnl autoconf to be bad because it is in /usr/sbin) is also reached by a 33dnl soft link through /bin, which autoconf believes is good. 34dnl 35dnl No variables are cached to ensure that we do not make a mistake in 36dnl our choice of install program. 37dnl 38dnl The Solaris configure requires the directory name to immediately 39dnl follow the '-c' argument, rather than the more common 40dnl.vb 41dnl args sourcefiles destination-dir 42dnl.ve 43dnl D*/ 44AC_DEFUN([PAC_PROG_CHECK_INSTALL_WORKS],[ 45if test -z "$INSTALL" ; then 46 AC_MSG_RESULT([No install program available]) 47else 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"]) 54 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 74fi 75]) 76