summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2007-05-12 22:40:50 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2007-05-12 22:40:50 (GMT)
commitdfb8f2827c72794e4bd153e8c598a0c3c5c12f17 (patch)
tree511dc1c3c25889e5a200c2396fb5780ee2c44b52 /configure.in
parent00a28dc9f20692f65296679747fcd9466f042cc4 (diff)
downloadhdf5-dfb8f2827c72794e4bd153e8c598a0c3c5c12f17.zip
hdf5-dfb8f2827c72794e4bd153e8c598a0c3c5c12f17.tar.gz
hdf5-dfb8f2827c72794e4bd153e8c598a0c3c5c12f17.tar.bz2
[svn-r13749] Description:
Changed it to turn off shared lib optoin if parallel is enabled. It can be turned on explicitly by --enable-shared. Tested platform: kagiso (serial and PP) and smirom (PP).
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in273
1 files changed, 144 insertions, 129 deletions
diff --git a/configure.in b/configure.in
index ab9edbd..c9ddb39 100644
--- a/configure.in
+++ b/configure.in
@@ -329,6 +329,150 @@ export AR
AC_PROG_MAKE_SET
AC_PROG_INSTALL
+dnl ----------------------------------------------------------------------
+dnl The following variables are used to distinguish between building a
+dnl serial and parallel library.
+dnl
+dnl HAVE_PARALLEL -- defined in H5config.h if we are building
+dnl a parallel library even if configure wasn't
+dnl able to find some header file or library that
+dnl might be required. This is defined if the
+dnl compiler looks like a parallel compiler (e.g.,
+dnl mpicc or mpcc) or if the user explicitly states
+dnl that a parallel library is being built by supplying
+dnl the `--enable-parallel' configure switch.
+dnl
+dnl PARALLEL -- This variable is set to a non-null value if
+dnl configure thinks we're compiling a parallel
+dnl version of the library.
+dnl
+dnl RUNSERIAL -- This is a command which will be prepended to
+dnl the executable name to run the executable using
+dnl a single process. For serial versions of the
+dnl library this will normally be empty. For parallel
+dnl versions it might be something like `mpirun -np 1'.
+dnl The value of this variable is substituted in *.in
+dnl files.
+dnl
+dnl RUNPARALLEL -- This is a command which will be prepended to
+dnl the executable name to run the executable on
+dnl multiple processors. For the serial library the
+dnl value will normally be the empty string. For
+dnl parallel library it should be something like
+dnl `mpi -np $$NPROCS' where NPROCS will eventually
+dnl contain the number of processors on which to run
+dnl the executable (the double dollarsigns are to
+dnl protect the expansion until make executes the
+dnl command). The value of this variable is
+dnl substituted in *.in files.
+dnl
+AC_SUBST([PARALLEL])
+AC_SUBST([RUNSERIAL])
+AC_SUBST([RUNPARALLEL])
+AC_SUBST([TESTPARALLEL])
+AC_SUBST([BUILD_PARALLEL_CONDITIONAL_TRUE])
+AC_SUBST([BUILD_PARALLEL_CONDITIONAL_FALSE])
+
+dnl ----------------------------------------------------------------------
+dnl If the compiler is obviously a parallel compiler then we're building
+dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore,
+dnl the name of the compiler might tell us how to run the resulting
+dnl executable. For `mpicc' the executable should be run with `mpirun' from
+dnl the same directory as mpicc if it exists.
+dnl
+case "$CC_BASENAME" in
+ mpicc)
+ dnl The mpich compiler. Use mpirun from the same directory if it
+ dnl exists.
+ PARALLEL=mpicc
+ AC_MSG_CHECKING([for mpirun])
+
+ dnl Find the path where mpicc is located.
+ cmd="`echo $CC | cut -f1 -d' '`"
+ if (echo $cmd | grep / >/dev/null); then
+ path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`"
+ else
+ for path in `echo $PATH | tr : ' '`; do
+ if test -x $path/$cmd; then
+ break
+ fi
+ done
+ fi
+
+ dnl Is there an mpirun at that path?
+ if test -x $path/mpirun; then
+ AC_MSG_RESULT([$path/mpirun])
+ RUNSERIAL="${RUNSERIAL:-none}"
+
+ if test -z "$RUNPARALLEL"; then
+ RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}"
+ fi
+ else
+ AC_MSG_RESULT([none])
+ fi
+ ;;
+
+ hcc)
+ dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory
+ dnl if it exists.
+ PARALLEL=hcc
+ AC_MSG_CHECKING([for mpirun_lam or mpirun])
+
+ dnl Find the path where hcc is located
+ cmd="`echo $CC | cut -f1 -d' '`"
+ if (echo $cmd | grep / >/dev/null); then
+ path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`"
+ else
+ for path in `echo $PATH | tr : ' '`; do
+ if test -x $path/$cmd; then
+ break
+ fi
+ done
+ fi
+
+ dnl Is there an mpirun_lam or mpirun at that path?
+ if test -x $path/mpirun_lam -o -x $path/mpirun; then
+ if test -x $path/mpirun_lam; then
+ cmd=mpirun_lam
+ else
+ cmd=mpirun
+ fi
+ AC_MSG_RESULT([$path/$cmd])
+ RUNSERIAL="${RUNSERIAL:-none}"
+ if test -z "$RUNPARALLEL"; then
+ RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}"
+ fi
+ else
+ AC_MSG_RESULT([none])
+ fi
+ ;;
+
+ mpcc|mpcc_r)
+ dnl The IBM compiler
+ PARALLEL="$CC_BASENAME"
+ ;;
+
+ *)
+ dnl Probably not a parallel compiler, but if `--enable-parallel'
+ dnl is defined below then we're still building a parallel hdf5.
+ ;;
+esac
+
+dnl ----------------------------------------------------------------------------
+dnl If shared libraries are being used with parallel, disable them, unless the
+dnl user explicity enables them via the '--enable-shared' option.
+if test "X${enable_shared}" = "X" -a "X${enable_parallel}" = "Xyes"; then
+ echo ' shared libraries disabled in parallel'
+ enable_shared="no"
+elif test "X${enable_shared}" = "Xyes" -a "X${enable_parallel}" = "Xyes"; then
+ echo ' shared libraries explicitly enabled by user'
+elif test "X${enable_shared}" = "X" -a "X${PARALLEL}" != "X"; then
+ echo ' shared libraries disabled when a parallel compiler is being used'
+ enable_shared="no"
+elif test "X${enable_shared}" = "Xyes" -a "X${PARALLEL}" != "X"; then
+ echo ' shared libraries explicitly enabled by user'
+fi
+
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
@@ -1764,135 +1908,6 @@ dnl Checkpoint the cache
AC_CACHE_SAVE
dnl ----------------------------------------------------------------------
-dnl The following variables are used to distinguish between building a
-dnl serial and parallel library.
-dnl
-dnl HAVE_PARALLEL -- defined in H5config.h if we are building
-dnl a parallel library even if configure wasn't
-dnl able to find some header file or library that
-dnl might be required. This is defined if the
-dnl compiler looks like a parallel compiler (e.g.,
-dnl mpicc or mpcc) or if the user explicitly states
-dnl that a parallel library is being built by supplying
-dnl the `--enable-parallel' configure switch.
-dnl
-dnl PARALLEL -- This variable is set to a non-null value if
-dnl configure thinks we're compiling a parallel
-dnl version of the library.
-dnl
-dnl RUNSERIAL -- This is a command which will be prepended to
-dnl the executable name to run the executable using
-dnl a single process. For serial versions of the
-dnl library this will normally be empty. For parallel
-dnl versions it might be something like `mpirun -np 1'.
-dnl The value of this variable is substituted in *.in
-dnl files.
-dnl
-dnl RUNPARALLEL -- This is a command which will be prepended to
-dnl the executable name to run the executable on
-dnl multiple processors. For the serial library the
-dnl value will normally be the empty string. For
-dnl parallel library it should be something like
-dnl `mpi -np $$NPROCS' where NPROCS will eventually
-dnl contain the number of processors on which to run
-dnl the executable (the double dollarsigns are to
-dnl protect the expansion until make executes the
-dnl command). The value of this variable is
-dnl substituted in *.in files.
-dnl
-AC_SUBST([PARALLEL])
-AC_SUBST([RUNSERIAL])
-AC_SUBST([RUNPARALLEL])
-AC_SUBST([TESTPARALLEL])
-AC_SUBST([BUILD_PARALLEL_CONDITIONAL_TRUE])
-AC_SUBST([BUILD_PARALLEL_CONDITIONAL_FALSE])
-
-dnl ----------------------------------------------------------------------
-dnl If the compiler is obviously a parallel compiler then we're building
-dnl a parallel version of hdf5 and should define HAVE_PARALLEL. Furthermore,
-dnl the name of the compiler might tell us how to run the resulting
-dnl executable. For `mpicc' the executable should be run with `mpirun' from
-dnl the same directory as mpicc if it exists.
-dnl
-case "$CC_BASENAME" in
- mpicc)
- dnl The mpich compiler. Use mpirun from the same directory if it
- dnl exists.
- PARALLEL=mpicc
- AC_MSG_CHECKING([for mpirun])
-
- dnl Find the path where mpicc is located.
- cmd="`echo $CC | cut -f1 -d' '`"
- if (echo $cmd | grep / >/dev/null); then
- path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`"
- else
- for path in `echo $PATH | tr : ' '`; do
- if test -x $path/$cmd; then
- break
- fi
- done
- fi
-
- dnl Is there an mpirun at that path?
- if test -x $path/mpirun; then
- AC_MSG_RESULT([$path/mpirun])
- RUNSERIAL="${RUNSERIAL:-none}"
-
- if test -z "$RUNPARALLEL"; then
- RUNPARALLEL="$path/mpirun -np \$\${NPROCS:=3}"
- fi
- else
- AC_MSG_RESULT([none])
- fi
- ;;
-
- hcc)
- dnl The LAM compiler. Use mpirun_lam or mpirun from the same directory
- dnl if it exists.
- PARALLEL=hcc
- AC_MSG_CHECKING([for mpirun_lam or mpirun])
-
- dnl Find the path where hcc is located
- cmd="`echo $CC | cut -f1 -d' '`"
- if (echo $cmd | grep / >/dev/null); then
- path="`echo $cmd | sed 's/\(.*\)\/.*$/\1/'`"
- else
- for path in `echo $PATH | tr : ' '`; do
- if test -x $path/$cmd; then
- break
- fi
- done
- fi
-
- dnl Is there an mpirun_lam or mpirun at that path?
- if test -x $path/mpirun_lam -o -x $path/mpirun; then
- if test -x $path/mpirun_lam; then
- cmd=mpirun_lam
- else
- cmd=mpirun
- fi
- AC_MSG_RESULT([$path/$cmd])
- RUNSERIAL="${RUNSERIAL:-none}"
- if test -z "$RUNPARALLEL"; then
- RUNPARALLEL="$path/$cmd -np \$\${NPROCS:=3}"
- fi
- else
- AC_MSG_RESULT([none])
- fi
- ;;
-
- mpcc|mpcc_r)
- dnl The IBM compiler
- PARALLEL="$CC_BASENAME"
- ;;
-
- *)
- dnl Probably not a parallel compiler, but if `--enable-parallel'
- dnl is defined below then we're still building a parallel hdf5.
- ;;
-esac
-
-dnl ----------------------------------------------------------------------
dnl What header files and libraries do we have to look for for parallel
dnl support? For the most part, search paths are already specified with
dnl CPPFLAGS and LDFLAGS or are known to the compiler. If the user says