summaryrefslogtreecommitdiffstats
path: root/fortran/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2000-10-10 23:15:40 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2000-10-10 23:15:40 (GMT)
commit820b18e5982fc81789a458677a020464dc649454 (patch)
tree6d5e537f4cbaaf244bb7b0129c4da05b296cbfbc /fortran/configure.in
parent900862b2c39fdd2de3b5bfc630fd990b9eed8268 (diff)
downloadhdf5-820b18e5982fc81789a458677a020464dc649454.zip
hdf5-820b18e5982fc81789a458677a020464dc649454.tar.gz
hdf5-820b18e5982fc81789a458677a020464dc649454.tar.bz2
[svn-r2659] Purpose:
Bug Fix Description: When running configure on subdirectories (like fortran/), looking up how make implements SEARCHes failed. Solution: Exporting the SEARCH macro so that subdirectories don't have to look for it. Platforms tested: Modi4.
Diffstat (limited to 'fortran/configure.in')
-rw-r--r--fortran/configure.in92
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