diff options
Diffstat (limited to 'fortran/configure.in')
-rw-r--r-- | fortran/configure.in | 92 |
1 files changed, 47 insertions, 45 deletions
diff --git a/fortran/configure.in b/fortran/configure.in index 0ccd7c0..ab66a7c 100644 --- a/fortran/configure.in +++ b/fortran/configure.in @@ -39,7 +39,7 @@ dnl we can find it no matter which directory of the distribution is our dnl current directory. The built-in pwd fails on some systems, but the dnl /bin/pwd version works OK. dnl -if test -x /bin/pwd; then +if test -x "/bin/pwd"; then pwd=/bin/pwd else pwd=pwd @@ -144,72 +144,74 @@ dnl Sometimes makes think the `.PATH:' appearing before the first rule dnl with an action should override the `all' default target. So we have dnl to decide what the proper syntax is. dnl -AC_MSG_CHECKING(how make searches directories) -while true; do #for break - dnl The most common method is `VPATH=DIR1 DIR2 ...' - cat >maketest <<EOF +if test -z "$SEARCH"; then + AC_MSG_CHECKING(how make searches directories) + while true; do #for break + dnl The most common method is `VPATH=DIR1 DIR2 ...' + cat >maketest <<EOF VPATH=$srcdir/config $srcdir/src $srcdir/bin .c.o: - cp $< H5.o - + cp $< H5.o + foo: H5.o /bin/rm -f H5.o @echo works EOF - - if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then - SEARCH_RULE='VPATH=' - SEARCH_SEP=' ' - AC_MSG_RESULT([VPATH=DIR1 DIR2 ...]) - break - fi - - dnl The second most common method is like above except with the - dnl directories separated by colons. - cat >maketest <<EOF + + if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then + SEARCH_RULE='VPATH=' + SEARCH_SEP=' ' + AC_MSG_RESULT([VPATH=DIR1 DIR2 ...]) + break + fi + + dnl The second most common method is like above except with the + dnl directories separated by colons. + cat >maketest <<EOF VPATH=$srcdir/config:$srcdir/src:$srcdir/bin .c.o: cp $< H5.o - + foo: H5.o /bin/rm -f H5.o @echo works EOF - - if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then - SEARCH_RULE='VPATH=' - SEARCH_SEP=':' - AC_MSG_RESULT([VPATH=DIR1:DIR2:...]) - break - fi - - dnl pmake uses the construct `.PATH: DIR1 DIR2 - cat >maketest <<EOF + + if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then + SEARCH_RULE='VPATH=' + SEARCH_SEP=':' + AC_MSG_RESULT([VPATH=DIR1:DIR2:...]) + break + fi + + dnl pmake uses the construct `.PATH: DIR1 DIR2 + cat >maketest <<EOF .PATH: $srcdir/config $srcdir/src $srcdir/bin .c.o: cp $< H5.o - + foo: H5.o /bin/rm -f H5.o @echo works EOF - if (MAKE= ${MAKE-make} -f maketest foo) >/dev/null 2>&1; then - SEARCH_RULE='.PATH: ' + if (MAKE= ${MAKE-make} -f maketest foo) >/dev/null 2>&1; then + SEARCH_RULE='.PATH: ' + SEARCH_SEP=' ' + AC_MSG_RESULT([.PATH: DIR1 DIR2 ...]) + break + fi + + dnl No way for make to search directories + SEARCH_RULE='## SEARCH DISABLED: ' SEARCH_SEP=' ' - AC_MSG_RESULT([.PATH: DIR1 DIR2 ...]) + AC_MSG_RESULT([it doesn't]) + if test ! -f configure; then + AC_MSG_ERROR(${MAKE-make} requires the build and source directories to be the same) + fi break - fi - - dnl No way for make to search directories - SEARCH_RULE='## SEARCH DISABLED: ' - SEARCH_SEP=' ' - AC_MSG_RESULT([it doesn't]) - if test ! -f configure; then - AC_MSG_ERROR(${MAKE-make} requires the build and source directories to be the same) - fi - break -done -rm maketest + done + rm maketest +fi dnl ---------------------------------------------------------------------- dnl Check for a Fortran 9X compiler, how to optimize it, and how to |