summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-09-27 23:05:16 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-09-27 23:05:16 (GMT)
commit4b13ea45720211e6b3cd01b793259fc21a41b6be (patch)
treeaf0cfd762b9592c229b6e4b6fbdb46ce0387769b /configure.in
parent6f754d0c571020da57ae700522b2ee91949cf908 (diff)
downloadhdf5-4b13ea45720211e6b3cd01b793259fc21a41b6be.zip
hdf5-4b13ea45720211e6b3cd01b793259fc21a41b6be.tar.gz
hdf5-4b13ea45720211e6b3cd01b793259fc21a41b6be.tar.bz2
[svn-r4487]
Purpose: Bug Fix Description: Some platforms don't handle echo -n correctly. Solution: Copied some code from the configure which determines which flag to give echo. Platforms tested: Linux
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in866
1 files changed, 440 insertions, 426 deletions
diff --git a/configure.in b/configure.in
index 993721b..a0e8fe9 100644
--- a/configure.in
+++ b/configure.in
@@ -11,17 +11,17 @@ AC_REVISION($Id$)
AC_INIT(src/H5.c)
AC_CONFIG_HEADER(src/H5config.h)
AC_OUTPUT_COMMANDS([
- echo "creating src/H5pubconf.h"
- sed 's/#define /#define H5_/' <src/H5config.h |\
- sed 's/#undef /#undef H5_/' >pubconf
- if test ! -f src/H5pubconf.h; then
- /bin/mv -f pubconf src/H5pubconf.h
- elif (diff pubconf src/H5pubconf.h >/dev/null); then
- /bin/rm -f pubconf
- echo "src/H5pubconf.h is unchanged"
- else
- /bin/mv -f pubconf src/H5pubconf.h
- fi
+ echo "creating src/H5pubconf.h"
+ sed 's/#define /#define H5_/' <src/H5config.h |\
+ sed 's/#undef /#undef H5_/' >pubconf
+ if test ! -f src/H5pubconf.h; then
+ /bin/mv -f pubconf src/H5pubconf.h
+ elif (diff pubconf src/H5pubconf.h >/dev/null); then
+ /bin/rm -f pubconf
+ echo "src/H5pubconf.h is unchanged"
+ else
+ /bin/mv -f pubconf src/H5pubconf.h
+ fi
])
AC_CONFIG_AUX_DIR(bin)
AC_CANONICAL_HOST
@@ -40,11 +40,11 @@ dnl running on now.
dnl
AC_CACHE_CHECK(for cached host,hdf5_cv_host,hdf5_cv_host="none");
if test $hdf5_cv_host = "none"; then
- hdf5_cv_host=$host
+ hdf5_cv_host=$host
elif test $hdf5_cv_host != $host; then
- echo "The config.cache file was generated on $hdf5_cv_host but"
- echo "this is $host. Please remove that file and try again."
- AC_MSG_ERROR(config.cache file is invalid)
+ echo "The config.cache file was generated on $hdf5_cv_host but"
+ echo "this is $host. Please remove that file and try again."
+ AC_MSG_ERROR(config.cache file is invalid)
fi
dnl ----------------------------------------------------------------------
@@ -64,34 +64,34 @@ dnl
dnl If the `OS' ends with a version number then remove it. For instance,
dnl `freebsd3.1' would become `freebsd'
case $host_os in
- aix4.*)
- host_os_novers=aix4.x
- ;;
- freebsd*)
- host_os_novers=freebsd
- ;;
- irix5.*)
- host_os_novers=irix5.x
- ;;
- irix6.*)
- host_os_novers=irix6.x
- ;;
- osf4.*)
- host_os_novers=osf4.x
- ;;
- osf5.*)
- host_os_novers=osf5.x
- ;;
- solaris2.*)
- host_os_novers=solaris2.x
- ;;
- *)
- host_os_novers=$host_os
- ;;
+ aix4.*)
+ host_os_novers=aix4.x
+ ;;
+ freebsd*)
+ host_os_novers=freebsd
+ ;;
+ irix5.*)
+ host_os_novers=irix5.x
+ ;;
+ irix6.*)
+ host_os_novers=irix6.x
+ ;;
+ osf4.*)
+ host_os_novers=osf4.x
+ ;;
+ osf5.*)
+ host_os_novers=osf5.x
+ ;;
+ solaris2.*)
+ host_os_novers=solaris2.x
+ ;;
+ *)
+ host_os_novers=$host_os
+ ;;
esac
AC_ARG_ENABLE(hsizet,
- [ --disable-hsizet Datasets can normally be larger than memory
+ [ --disable-hsizet Datasets can normally be larger than memory
and/or files but some compilers are unable to
handle this (including versions of GCC before
2.8.0). Disabling the feature causes dataset
@@ -135,7 +135,7 @@ for f in $host_cpu-$host_vendor-$host_os \
AC_MSG_RESULT(no)
done
if test $host_config != "none"; then
- CC_BASENAME="`echo $CC |cut -f1 -d' ' |xargs basename 2>/dev/null`"
+ CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
. $host_config
fi
@@ -159,7 +159,7 @@ dnl ----------------------------------------------------------------------
dnl Check for programs.
dnl
AC_PROG_CC
-CC_BASENAME="`echo $CC |cut -f1 -d' ' | xargs basename 2>/dev/null`"
+CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
AC_SUBST(config_dirs) config_dirs=""
@@ -314,8 +314,8 @@ dnl to decide what the proper syntax is.
dnl
AC_MSG_CHECKING(how make searches directories)
while true; do #for break
- # The most common method is `VPATH=DIR1 DIR2 ...'
- cat >maketest <<EOF
+ # The most common method is `VPATH=DIR1 DIR2 ...'
+ cat >maketest <<EOF
VPATH=$srcdir/config $srcdir/src $srcdir/bin
.c.o:
cp $< H5.o
@@ -324,16 +324,17 @@ 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
@@ -342,15 +343,16 @@ 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
@@ -359,21 +361,22 @@ 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: '
- 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([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
+
+ 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([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
@@ -386,28 +389,28 @@ AC_ARG_ENABLE(production,
[ --enable-production Determines how to run the compiler.])
case "X-$enable_production" in
- X-yes)
- AC_MSG_RESULT("production")
- CONFIG_MODE=production
- CFLAGS="$CFLAGS $PROD_CFLAGS"
- CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
- ;;
- X-|X-no)
- AC_MSG_RESULT("development")
- CONFIG_MODE=development
- CFLAGS="$CFLAGS $DEBUG_CFLAGS"
- CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
- ;;
- X-pg|X-profile)
- AC_MSG_RESULT("profile")
- CONFIG_MODE=profile
- CFLAGS="$CFLAGS $PROFILE_CFLAGS"
- CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
- ;;
- *)
- AC_MSG_RESULT("user-defined")
- CONFIG_MODE="$X-enableval"
- ;;
+ X-yes)
+ AC_MSG_RESULT("production")
+ CONFIG_MODE=production
+ CFLAGS="$CFLAGS $PROD_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+ ;;
+ X-|X-no)
+ AC_MSG_RESULT("development")
+ CONFIG_MODE=development
+ CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+ ;;
+ X-pg|X-profile)
+ AC_MSG_RESULT("profile")
+ CONFIG_MODE=profile
+ CFLAGS="$CFLAGS $PROFILE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
+ ;;
+ *)
+ AC_MSG_RESULT("user-defined")
+ CONFIG_MODE="$X-enableval"
+ ;;
esac
dnl ----------------------------------------------------------------------
@@ -416,8 +419,8 @@ dnl
AC_CHECK_LIB(m,ceil)
if test "`uname`" = "SunOS" -o "`uname -sr`" = "HP-UX B.11.00"; then
- dnl ...for Solaris and hdf4
- AC_CHECK_LIB(nsl, xdr_int)
+ dnl ...for Solaris and hdf4
+ AC_CHECK_LIB(nsl, xdr_int)
fi
dnl AC_CHECK_LIB(coug,main) dnl ...for ASCI/Red
@@ -436,13 +439,13 @@ dnl Windows
AC_CHECK_HEADERS(io.h winsock.h sys/timeb.h)
case "$host" in
- alpha*-dec*-osf*)
- dnl The <sys/sysinfo.h> and <sys/proc.h> are needed on the DEC
- dnl Alpha to turn off UAC fixing. We do *not* attempt to
- dnl locate these files on other systems because there are too
- dnl many problems with including them.
- AC_CHECK_HEADERS(sys/sysinfo.h sys/proc.h)
- ;;
+ alpha*-dec*-osf*)
+ dnl The <sys/sysinfo.h> and <sys/proc.h> are needed on the DEC
+ dnl Alpha to turn off UAC fixing. We do *not* attempt to
+ dnl locate these files on other systems because there are too
+ dnl many problems with including them.
+ AC_CHECK_HEADERS(sys/sysinfo.h sys/proc.h)
+ ;;
esac
dnl ----------------------------------------------------------------------
@@ -450,51 +453,50 @@ dnl Test for 64bit stuff before the data types and their sizes. The
dnl result could effect the outcome of the sizeof macros below.
dnl
case "$host_cpu-$host_vendor-$host_os" in
- *linux*)
- dnl ----------------------------------------------------------------------
- dnl Enable large file support on linux? Store the result in the LINUX_LFS
- dnl variable for posterity
- AC_ARG_ENABLE(linux-lfs,
- [ --enable-linux-lfs Enable support for large (64-bit) files on linux. [default=check]])
-
- case "X-$enable_linux_lfs" in
- X-yes)
- LINUX_LFS=yes
- ;;
- X-no)
- LINUX_LFS=no
- ;;
- X-|*)
- LINUX_LFS=no
- AC_CHECK_FUNCS(getdents64,
- dnl Add the large file support flags to the CPPFLAGS macro if
- dnl we're on a Linux system which austensibly supports LFS. (We
- dnl think it does if it has the ``getdents64'' syscall).
- LINUX_LFS=yes
- )
- ;;
- esac
+ *linux*)
+ dnl ----------------------------------------------------------------------
+ dnl Enable large file support on linux? Store the result in the LINUX_LFS
+ dnl variable for posterity
+ AC_ARG_ENABLE(linux-lfs,
+ [ --enable-linux-lfs Enable support for large (64-bit) files on linux. [default=check]])
+
+ case "X-$enable_linux_lfs" in
+ X-yes)
+ LINUX_LFS=yes
+ ;;
+ X-no)
+ LINUX_LFS=no
+ ;;
+ X-|*)
+ LINUX_LFS=no
+ AC_CHECK_FUNCS(getdents64,
+ dnl Add the large file support flags to the CPPFLAGS macro if
+ dnl we're on a Linux system which austensibly supports LFS. (We
+ dnl think it does if it has the ``getdents64'' syscall).
+ LINUX_LFS=yes)
+ ;;
+ esac
- AC_MSG_CHECKING(for large file support on linux mode)
- if test "X$LINUX_LFS" = "Xyes"; then
- AC_MSG_RESULT(enabled)
+ AC_MSG_CHECKING(for large file support on linux mode)
+ if test "X$LINUX_LFS" = "Xyes"; then
+ AC_MSG_RESULT(enabled)
- CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
- else
- AC_MSG_RESULT(disabled)
- fi
+ CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
+ else
+ AC_MSG_RESULT(disabled)
+ fi
+
+ dnl Add POSIX support on Linux systems, so <features.h> defines
+ dnl __USE_POSIX, which is required to get the prototype for fdopen
+ dnl defined correctly in <stdio.h>
+ CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
- dnl Add POSIX support on Linux systems, so <features.h> defines
- dnl __USE_POSIX, which is required to get the prototype for fdopen
- dnl defined correctly in <stdio.h>
- CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
-
- dnl Also add BSD support on Linux systems, so <features.h> defines
- dnl __USE_BSD, which is required to get the prototype for strdup
- dnl defined correctly in <string.h> and snprintf & vsnprintf defined
- dnl correctly in <stdio.h>
- CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
- ;;
+ dnl Also add BSD support on Linux systems, so <features.h> defines
+ dnl __USE_BSD, which is required to get the prototype for strdup
+ dnl defined correctly in <string.h> and snprintf & vsnprintf defined
+ dnl correctly in <stdio.h>
+ CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
+ ;;
esac
AC_TRY_COMPILE([#include <sys/types.h>],
@@ -528,7 +530,7 @@ cat >>confdefs.h <<\EOF
EOF
if test "X$C9x" = "Xyes"; then
- cat >>confdefs.h <<\EOF
+ cat >>confdefs.h <<\EOF
#include <stdint.h>
EOF
fi
@@ -574,8 +576,8 @@ AC_CACHE_SAVE
dnl ----------------------------------------------------------------------
dnl Check if the dev_t type is a scalar type (must come after the check for
dnl sys/types.h)
- AC_MSG_CHECKING([if dev_t is scalar])
- AC_TRY_COMPILE([
+AC_MSG_CHECKING([if dev_t is scalar])
+AC_TRY_COMPILE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -583,7 +585,7 @@ dnl sys/types.h)
[dev_t d1, d2; if(d1==d2) return 0;],
AC_DEFINE(DEV_T_IS_SCALAR) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
- )
+)
dnl ----------------------------------------------------------------------
dnl Is HDF4 present? If so then we can compile the hdf4 related tools.
@@ -895,7 +897,7 @@ if test -n "$GRIDSTORAGE" -o -n "$GASS"; then
dnl Storage driver.
dnl
AC_SUBST(SSL) SSL=yes
- AC_ARG_WITH(ssl,[ --with-ssl=LIB Use SSL libs from LIB ],,)
+ AC_ARG_WITH(ssl, [ --with-ssl=LIB Use SSL libs from LIB ],,)
if test -n "$with_ssl"; then
LDFLAGS="$LDFLAGS -L$with_ssl"
@@ -910,7 +912,7 @@ dnl Are SRB Client and other system libraries(socket, elf) present?
dnl
AC_SUBST(SRB) SRB=yes
AC_SUBST(TESTSRB) TESTSRB='$(srcdir)/testsrb'
-AC_ARG_WITH(srb,[ --with-srb=INC,LIB Use the SRB Library [default=no]],,
+AC_ARG_WITH(srb, [ --with-srb=INC,LIB Use the SRB Library [default=no]],,
withval=no)
case "$withval" in
@@ -983,41 +985,41 @@ AC_ARG_WITH(pthread,
withval=no)
case "$withval" in
- yes)
- AC_CHECK_HEADERS(pthread.h)
- if test `uname` != "FreeBSD"; then
- AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
- else
- CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
- LDFLAGS="$LDFLAGS -pthread"
- LIBS="$LIBS -lcipher"
- fi
- ;;
- no)
- AC_MSG_CHECKING(for pthread)
- AC_MSG_RESULT(suppressed)
- unset PTHREAD
- ;;
- *)
- pthread_inc="`echo $withval |cut -f1 -d,`"
- if test -n "$pthread_inc"; then
- saved_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I$pthread_inc"
- AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD)
- else
- AC_CHECK_HEADERS(pthread.h,,unset PTHREAD)
- fi
+ yes)
+ AC_CHECK_HEADERS(pthread.h)
+ if test `uname` != "FreeBSD"; then
+ AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
+ else
+ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE"
+ LDFLAGS="$LDFLAGS -pthread"
+ LIBS="$LIBS -lcipher"
+ fi
+ ;;
+ no)
+ AC_MSG_CHECKING(for pthread)
+ AC_MSG_RESULT(suppressed)
+ unset PTHREAD
+ ;;
+ *)
+ pthread_inc="`echo $withval |cut -f1 -d,`"
+ if test -n "$pthread_inc"; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$pthread_inc"
+ AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD)
+ else
+ AC_CHECK_HEADERS(pthread.h,,unset PTHREAD)
+ fi
- pthread_lib="`echo $withval |cut -f2 -d, -s`"
- if test -n "$pthread_lib"; then
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -L$pthread_lib"
- AC_CHECK_LIB(pthread, pthread_create,,
- LDFLAGS="$saved_LDFLAGS"; unset PTHREAD)
- else
- AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
- fi
- ;;
+ pthread_lib="`echo $withval |cut -f2 -d, -s`"
+ if test -n "$pthread_lib"; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -L$pthread_lib"
+ AC_CHECK_LIB(pthread, pthread_create,,
+ LDFLAGS="$saved_LDFLAGS"; unset PTHREAD)
+ else
+ AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD)
+ fi
+ ;;
esac
dnl ----------------------------------------------------------------------
@@ -1025,8 +1027,8 @@ dnl Enable thread-safe version of library. It requires pthread on.
dnl
AC_MSG_CHECKING(for thread safe support)
AC_ARG_ENABLE(threadsafe,
- [ --enable-threadsafe Enable thread safe capability],
- THREADSAFE=$enableval)
+ [ --enable-threadsafe Enable thread safe capability],
+ THREADSAFE=$enableval)
case "X-$THREADSAFE" in
X-|X-no)
@@ -1356,80 +1358,80 @@ 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
+ 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
+ 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
+ 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
- AC_MSG_RESULT(none)
+ 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"
- ;;
+ 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.
- ;;
+ *)
+ dnl Probably not a parallel compiler, but if `--enable-parallel'
+ dnl is defined below then we're still building a parallel hdf5.
+ ;;
esac
dnl ----------------------------------------------------------------------
@@ -1441,108 +1443,108 @@ dnl or mpcc) then parallel support is enabled but configure doesn't search
dnl for any parallel header files or libraries.
dnl
AC_ARG_ENABLE(parallel,
- [ --enable-parallel=TYPE Search for MPI-IO and MPI support files])
+ [ --enable-parallel=TYPE Search for MPI-IO and MPI support files])
AC_MSG_CHECKING(for parallel support files)
case "X-$enable_parallel" in
- X-|X-no|X-none)
- dnl Either we are not compiling for parallel or the header and
- dnl library files and locations are known to the compiler (this is
- dnl the case for a correct installation of mpicc for instance).
- AC_MSG_RESULT(skipped)
- ;;
-
- X-yes)
- dnl We want to compile a parallel library with a compiler that
- dnl may already know how to link with MPI and MPI-IO.
- AC_MSG_RESULT(provided by compiler)
- PARALLEL=yes
-
- dnl Try link a simple MPI program. If fail, try again with -lmpi.
- AC_TRY_LINK(,MPI_Init(),,AC_CHECK_LIB(mpi,MPI_Init,,PARALLEL=no))
-
- dnl Then try link a simple MPI-IO program. If fail, try again with
- dnl -lmpio.
- if test "X$PARALLEL" = "Xyes"; then
- AC_TRY_LINK(,MPI_File_open(),,
- AC_CHECK_LIB(mpio,MPI_File_open,,PARALLEL=no))
- fi
+ X-|X-no|X-none)
+ dnl Either we are not compiling for parallel or the header and
+ dnl library files and locations are known to the compiler (this is
+ dnl the case for a correct installation of mpicc for instance).
+ AC_MSG_RESULT(skipped)
+ ;;
- dnl Set RUNPARALLEL to mpirun if not set yet.
- if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then
- RUNPARALLEL="mpirun -np \$\${NPROCS:=3}"
- fi
- ;;
-
- X-mpich)
- dnl For normal mpich installation the compiler, mpicc, should know
- dnl where the MPI and MPI-IO header files are located and know which
- dnl extra libraries need to be linked and will supply appropriate
- dnl flags to the underlying compiler.
- AC_MSG_RESULT(mpich)
- AC_MSG_WARN(*** Why aren't you using an mpicc compiler? ***)
-
- dnl Apparently mpicc isn't installed correctly so configure must search
- dnl for the header files and libraries. Actually we only have to search
- dnl for the libraries in order to get the onto the link line, the user
- dnl will have already told us about the locations. Fail if something
- dnl is missing.
- PARALLEL=mpich
- AC_CHECK_LIB(mpich,MPI_Init,,AC_MSG_ERROR(no mpich library))
- ;;
-
- *)
- AC_MSG_RESULT(error)
- AC_MSG_ERROR(\'$enable_parallel\' is not a valid parallel search type)
- ;;
+ X-yes)
+ dnl We want to compile a parallel library with a compiler that
+ dnl may already know how to link with MPI and MPI-IO.
+ AC_MSG_RESULT(provided by compiler)
+ PARALLEL=yes
+
+ dnl Try link a simple MPI program. If fail, try again with -lmpi.
+ AC_TRY_LINK(,MPI_Init(),,AC_CHECK_LIB(mpi,MPI_Init,,PARALLEL=no))
+
+ dnl Then try link a simple MPI-IO program. If fail, try again with
+ dnl -lmpio.
+ if test "X$PARALLEL" = "Xyes"; then
+ AC_TRY_LINK(,MPI_File_open(),,
+ AC_CHECK_LIB(mpio,MPI_File_open,,PARALLEL=no))
+ fi
+
+ dnl Set RUNPARALLEL to mpirun if not set yet.
+ if test "X$PARALLEL" = "Xyes" -a -z "$RUNPARALLEL"; then
+ RUNPARALLEL="mpirun -np \$\${NPROCS:=3}"
+ fi
+ ;;
+
+ X-mpich)
+ dnl For normal mpich installation the compiler, mpicc, should know
+ dnl where the MPI and MPI-IO header files are located and know which
+ dnl extra libraries need to be linked and will supply appropriate
+ dnl flags to the underlying compiler.
+ AC_MSG_RESULT(mpich)
+ AC_MSG_WARN(*** Why aren't you using an mpicc compiler? ***)
+
+ dnl Apparently mpicc isn't installed correctly so configure must search
+ dnl for the header files and libraries. Actually we only have to search
+ dnl for the libraries in order to get the onto the link line, the user
+ dnl will have already told us about the locations. Fail if something
+ dnl is missing.
+ PARALLEL=mpich
+ AC_CHECK_LIB(mpich,MPI_Init,,AC_MSG_ERROR(no mpich library))
+ ;;
+
+ *)
+ AC_MSG_RESULT(error)
+ AC_MSG_ERROR(\'$enable_parallel\' is not a valid parallel search type)
+ ;;
esac
dnl ----------------------------------------------------------------------
dnl Should the `testpar' directory participate in the build?
dnl
if test -n "$PARALLEL"; then
- TESTPARALLEL=testpar
+ TESTPARALLEL=testpar
fi
dnl ----------------------------------------------------------------------
dnl Print some other parallel information and do some sanity checks.
dnl
if test -n "$PARALLEL"; then
- dnl We are building a parallel library
- AC_DEFINE(HAVE_PARALLEL)
-
- dnl Display what we found about running programs
- AC_MSG_CHECKING(prefix for running on one processor)
- AC_MSG_RESULT($RUNSERIAL)
- AC_MSG_CHECKING(prefix for running in parallel)
- AC_MSG_RESULT($RUNPARALLEL)
-
- dnl Check that we can link a simple MPI and MPI-IO application
- AC_MSG_CHECKING(whether a simple MPI-IO program can be linked)
- AC_TRY_LINK(,[MPI_Init();MPI_File_open();],
- AC_MSG_RESULT(yes),
- AC_MSG_RESULT(no)
- AC_MSG_ERROR('unable to link a simple MPI-IO application'))
-
- dnl There *must* be some way to run in parallel even if it's just the
- dnl word `none'.
- if test -z "$RUNPARALLEL"; then
- AC_MSG_ERROR(no way to run a parallel program)
- fi
-
- dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with
- dnl the empty string.
- if test "X$RUNSERIAL" = "Xnone"; then
- RUNSERIAL=
- fi
- if test "X$RUNPARALLEL" = "Xnone"; then
- RUNPARALLEL=
- fi
-
- dnl Check whether MPI_Get_count actually works correctly on this
- dnl platform.
- AC_MSG_CHECKING(whether a MPI_Get_count works correctly)
- AC_TRY_RUN([
+ dnl We are building a parallel library
+ AC_DEFINE(HAVE_PARALLEL)
+
+ dnl Display what we found about running programs
+ AC_MSG_CHECKING(prefix for running on one processor)
+ AC_MSG_RESULT($RUNSERIAL)
+ AC_MSG_CHECKING(prefix for running in parallel)
+ AC_MSG_RESULT($RUNPARALLEL)
+
+ dnl Check that we can link a simple MPI and MPI-IO application
+ AC_MSG_CHECKING(whether a simple MPI-IO program can be linked)
+ AC_TRY_LINK(,[MPI_Init();MPI_File_open();],
+ AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR('unable to link a simple MPI-IO application'))
+
+ dnl There *must* be some way to run in parallel even if it's just the
+ dnl word `none'.
+ if test -z "$RUNPARALLEL"; then
+ AC_MSG_ERROR(no way to run a parallel program)
+ fi
+
+ dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with
+ dnl the empty string.
+ if test "X$RUNSERIAL" = "Xnone"; then
+ RUNSERIAL=""
+ fi
+ if test "X$RUNPARALLEL" = "Xnone"; then
+ RUNPARALLEL=""
+ fi
+
+ dnl Check whether MPI_Get_count actually works correctly on this
+ dnl platform.
+ AC_MSG_CHECKING(whether a MPI_Get_count works correctly)
+ AC_TRY_RUN([
#include <mpi.h>
int main(int argc, char **argv)
@@ -1555,14 +1557,14 @@ int main(int argc, char **argv)
MPI_Finalize();
/* this returns TRUE if bytes_read is 0...the shell thinks that the
- * program fails, but we want it didn't of course so switch the
+ * program fails, but we want it to fail of course so switch the
* "true"/"false" parts of the TRY_RUN macro */
return bytes_read == 0;
}
- ],
- AC_MSG_RESULT(no),
- AC_MSG_RESULT(yes)
- CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS",AC_MSG_RESULT(no))
+ ],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(yes)
+ CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS",AC_MSG_RESULT(no))
fi
dnl ----------------------------------------------------------------------
@@ -1580,7 +1582,7 @@ AC_SUBST(CONFIG_DATE) CONFIG_DATE=`date`
dnl User doing the configuration
AC_SUBST(CONFIG_USER) CONFIG_USER="`whoami`@`hostname`"
if test -n "$ORGANIZATION"; then
- CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
+ CONFIG_USER="$CONFIG_USER at $ORGANIZATION"
fi
dnl Configuration mode (production, development, profile, etc) saved above.
@@ -1589,9 +1591,9 @@ AC_SUBST(CONFIG_MODE)
dnl Byte sex from the AC_C_BIGENDIAN macro.
AC_SUBST(BYTESEX)
if test "X$ac_cv_c_bigendian" = "Xyes"; then
- BYTESEX="big-endian"
+ BYTESEX="big-endian"
else
- BYTESEX="little-endian"
+ BYTESEX="little-endian"
fi
dnl Are we compiling static libraries, shared libraries, or both? This
@@ -1603,23 +1605,23 @@ dnl lines that set the value of `build_libtool_libs' (shared) and
dnl `build_old_libs' (static).
AC_SUBST(STATIC_SHARED)
if (grep '^build_libtool_libs=yes' libtool >/dev/null); then
- enable_shared=yes
+ enable_shared=yes
else
- enable_shared=no
+ enable_shared=no
fi
if (grep '^build_old_libs=yes' libtool >/dev/null); then
- enable_static=yes
+ enable_static=yes
else
- enable_static=no
+ enable_static=no
fi
if test "X$enable_static" = "Xyes" && test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="static, shared"
+ STATIC_SHARED="static, shared"
elif test "X$enable_static" = "Xyes"; then
- STATIC_SHARED="static"
+ STATIC_SHARED="static"
elif test "X$enable_shared" = "Xyes"; then
- STATIC_SHARED="shared"
+ STATIC_SHARED="shared"
else
- STATIC_SHARED="none"
+ STATIC_SHARED="none"
fi
dnl Parallel support? (set above except empty if none)
@@ -1629,18 +1631,18 @@ dnl Compiler with version information. This consists of the full path
dnl name of the compiler and the reported version number.
AC_SUBST(CC_VERSION)
if `echo $CC | grep / 2>&1 /dev/null`; then
- CC_VERSION="$CC"
+ CC_VERSION="$CC"
else
- CC_VERSION="$CC";
- for x in `echo $PATH | sed -e 's/:/ /g'`; do
- if test -x $x/$CC; then
- CC_VERSION="$x/$CC"
- break
- fi
- done
+ CC_VERSION="$CC";
+ for x in `echo $PATH | sed -e 's/:/ /g'`; do
+ if test -x $x/$CC; then
+ CC_VERSION="$x/$CC"
+ break
+ fi
+ done
fi
if test -n "$cc_vendor" && test -n "$cc_version"; then
- CC_VERSION="$CC_VERSION ($cc_vendor-$cc_version)"
+ CC_VERSION="$CC_VERSION ($cc_vendor-$cc_version)"
fi
dnl ----------------------------------------------------------------------
@@ -1650,9 +1652,9 @@ 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
- pwd=/bin/pwd
+ pwd=/bin/pwd
else
- pwd=pwd
+ pwd=pwd
fi
AC_SUBST(ROOT) ROOT=`$pwd`
@@ -1663,38 +1665,38 @@ dnl libraries.
dnl
DYNAMIC_DIRS=""
if test -n "$LDFLAGS"; then
- for d in $LDFLAGS ; do
- case "$d" in
- -L*)
- d=`echo $d | sed -e 's/-L//g'`
- case "$d" in
- .*)
- dnl If the path isn't absolute, make it so by
- dnl prepending the ROOT directory to it.
- d=${ROOT}/$d
- ;;
- esac
- DYNAMIC_DIRS="-R${d} $DYNAMIC_DIRS"
- ;;
- esac
- done
+ for d in $LDFLAGS ; do
+ case "$d" in
+ -L*)
+ d=`echo $d | sed -e 's/-L//g'`
+ case "$d" in
+ .*)
+ dnl If the path isn't absolute, make it so by
+ dnl prepending the ROOT directory to it.
+ d=${ROOT}/$d
+ ;;
+ esac
+ DYNAMIC_DIRS="-R${d} $DYNAMIC_DIRS"
+ ;;
+ esac
+ done
fi
AC_SUBST(DYNAMIC_DIRS)
if test -n "$CPPFLAGS"; then
- TEMP_CPPFLAGS=""
- for d in $CPPFLAGS ; do
- case "$d" in
- -I.*)
- dnl If the path isn't absolute, make it so by prepending
- dnl the ROOT directory to it.
- d=`echo $d | sed -e 's/-I//g'`
- d=-I${ROOT}/${d}
- ;;
- esac
- TEMP_CPPFLAGS="$d $TEMP_CPPFLAGS"
- done
- CPPFLAGS=$TEMP_CPPFLAGS
+ TEMP_CPPFLAGS=""
+ for d in $CPPFLAGS ; do
+ case "$d" in
+ -I.*)
+ dnl If the path isn't absolute, make it so by prepending
+ dnl the ROOT directory to it.
+ d="`echo $d | sed -e 's/-I//g'`"
+ d="-I${ROOT}/${d}"
+ ;;
+ esac
+ TEMP_CPPFLAGS="$d $TEMP_CPPFLAGS"
+ done
+ CPPFLAGS=$TEMP_CPPFLAGS
fi
dnl ----------------------------------------------------------------------
@@ -1714,9 +1716,9 @@ export SEARCH
dnl We don't need to say when we're entering directories if we're using
dnl GNU make becuase make does it for us.
if test "X$GMAKE" = "Xyes"; then
- AC_SUBST(SETX) SETX=":"
+ AC_SUBST(SETX) SETX=":"
else
- AC_SUBST(SETX) SETX="set -x"
+ AC_SUBST(SETX) SETX="set -x"
fi
dnl Some cleanup stuff
@@ -1738,13 +1740,13 @@ no_create=yes
PARALLEL_MAKE=
if test -n "$TESTPARALLEL"; then
- PARALLEL_MAKE="$TESTPARALLEL/Makefile"
+ PARALLEL_MAKE="$TESTPARALLEL/Makefile"
fi
EXTRA_H4_MAKEFILES=
if test -n "$H4TOH5"; then
- EXTRA_H4_MAKEFILES="$EXTRA_H4_MAKEFILES tools/h4toh5/Makefile"
+ EXTRA_H4_MAKEFILES="$EXTRA_H4_MAKEFILES tools/h4toh5/Makefile"
fi
if test -n "$H5TOH4"; then
@@ -1824,18 +1826,30 @@ IF_ENABLED_DISABLED() {
fi
}
+if test -z "$ECHO_N"; then
+ if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+ if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+ ECHO_N=
+ else
+ ECHO_N=-n
+ fi
+ else
+ ECHO_N=
+ fi
+fi
+
echo ""
echo "Compiling Options:"
-echo -n " Compilation Mode: "
+echo $ECHO_N " Compilation Mode: "
case "X-$enable_production" in
- X-yes) echo "Production" ;;
- X-|X-no) echo "Development" ;;
- X-pg|X-profile) echo "Profile" ;;
- *) echo "$enable_production" ;;
+ X-yes) echo "Production" ;;
+ X-|X-no) echo "Development" ;;
+ X-pg|X-profile) echo "Profile" ;;
+ *) echo "$enable_production" ;;
esac
-echo -n " Debug Mode: "
+echo $ECHO_N " Debug Mode: "
case "X-$DEBUG_PKG" in
X-|X-yes) echo "Default" ;;
X-all) echo "All" ;;
@@ -1843,16 +1857,16 @@ case "X-$DEBUG_PKG" in
*) echo "$DEBUG_PKG" ;;
esac
-echo -n " Shared Libraries: "
+echo $ECHO_N " Shared Libraries: "
IF_YES_NO "$enable_shared"
-echo -n " Static Libraries: "
+echo $ECHO_N " Static Libraries: "
IF_YES_NO "$enable_static"
-echo -n " Statically Linked Executables: "
+echo $ECHO_N " Statically Linked Executables: "
IF_YES_NO "$STATIC_EXEC"
-echo -n " Tracing: "
+echo $ECHO_N " Tracing: "
if test -z "$TRACE" -o "X$TRACE" = "Xyes"; then
echo "Yes"
else
@@ -1862,48 +1876,48 @@ fi
echo ""
echo "Features:"
-echo -n " C++: "
+echo $ECHO_N " C++: "
IF_YES_NO "$HDF_CXX"
-echo -n " Fortran: "
+echo $ECHO_N " Fortran: "
IF_YES_NO "$HDF_FORTRAN"
-echo -n " GASS: "
+echo $ECHO_N " GASS: "
IF_YES_NO "$GASS"
-echo -n " GridStorage: "
+echo $ECHO_N " GridStorage: "
IF_YES_NO "$GRIDSTORAGE"
-echo -n " HDF4: "
+echo $ECHO_N " HDF4: "
IF_YES_NO "$HAVE_HDF4"
-echo -n " HDF5 v1.4 Compatibility: "
+echo $ECHO_N " HDF5 v1.4 Compatibility: "
IF_YES_NO "$HDF5_V1_4_COMPAT"
-echo -n " hsize_t: "
+echo $ECHO_N " hsize_t: "
case "$HSIZET" in
no|small) echo "Small" ;;
*) echo "Large" ;;
esac
-echo -n " Linux Large File Support (LFS): "
+echo $ECHO_N " Linux Large File Support (LFS): "
IF_ENABLED_DISABLED "$LINUX_LFS"
-echo -n " Parallel HDF5: "
+echo $ECHO_N " Parallel HDF5: "
if test "$PARALLEL" != "no"; then
echo "Yes"
else
echo "No"
fi
-echo -n " SRB: "
+echo $ECHO_N " SRB: "
IF_YES_NO "$SRB"
-echo -n " Stream VFD: "
+echo $ECHO_N " Stream VFD: "
IF_ENABLED_DISABLED "$STREAM_VFD"
-echo -n " Threadsafety: "
+echo $ECHO_N " Threadsafety: "
IF_ENABLED_DISABLED "$THREADSAFE"
-echo -n " Zlib-compression: "
+echo $ECHO_N " Zlib-compression: "
IF_YES_NO "$HAVE_ZLIB"