diff options
author | James Laird <jlaird@hdfgroup.org> | 2005-02-01 03:17:02 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2005-02-01 03:17:02 (GMT) |
commit | 26303241febadd20aea77fc8a1d48f05823170af (patch) | |
tree | 4ba1d92050fa6cc33feab6a38bc9778f71bbb146 /configure.in | |
parent | 9f17319144fca94a852fd500487b0e4ae48e0997 (diff) | |
download | hdf5-26303241febadd20aea77fc8a1d48f05823170af.zip hdf5-26303241febadd20aea77fc8a1d48f05823170af.tar.gz hdf5-26303241febadd20aea77fc8a1d48f05823170af.tar.bz2 |
[svn-r9902] Purpose:
Configuration feature
Description:
HDF5 now uses automake to generate Makefiles
Solution:
Makefile.in files are now generated from Makefile.am files.
To reconfigure (after chaning a Makefile.am or configure.in):
/bin/sh bin/reconfigure.sh
Platforms tested:
Many
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 188 |
1 files changed, 62 insertions, 126 deletions
diff --git a/configure.in b/configure.in index 183588b..5c39632 100644 --- a/configure.in +++ b/configure.in @@ -27,9 +27,10 @@ dnl release!!! dnl AC_INIT([HDF5], [1.7.45], [hdfhelp@ncsa.uiuc.edu]) AC_CONFIG_SRCDIR([src/H5.c]) -AC_CONFIG_HEADER([src/H5config.h]) +AM_CONFIG_HEADER([src/H5config.h]) AC_CONFIG_AUX_DIR([bin]) +AM_INIT_AUTOMAKE AC_OUTPUT_COMMANDS([ echo "creating src/H5pubconf.h" @@ -178,7 +179,7 @@ case $HSIZET in AC_MSG_RESULT([large]) HSIZET=large AC_DEFINE([HAVE_LARGE_HSIZET], [1], - [Define if it's safe to use \`long long' for hsize_t and hssize_t]) + [Define if it's safe to use `long long' for hsize_t and hssize_t]) ;; esac @@ -269,6 +270,14 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_PROG_F9X AC_F9X_MODS + dnl Tell automake to use the F9X compiler + AC_SUBST(FC) FC=$F9X + AC_SUBST(F77) F77=$F9X + + dnl Automake wants to build in F77 instead of F9X. Kludge around this + dnl by telling it to use the same fortran compiler for both. + dnl AC_PROG_F77($FC) + dnl Change to the Fortran 90 language AC_LANG_FORTRAN9X @@ -422,7 +431,7 @@ fi dnl ---------------------------------------------------------------------- dnl Check which archiving tool to use. This needs to be done before -dnl the AC_PROG_LIBTOOL macro. +dnl the AM_PROG_LIBTOOL macro. dnl if test -z "$AR"; then AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH]) @@ -436,7 +445,7 @@ export AR AC_PROG_MAKE_SET AC_PROG_INSTALL AC_LIBTOOL_DLOPEN -AC_PROG_LIBTOOL +AM_PROG_LIBTOOL dnl Post processing to patch up some deficiencies in libtool case $host_os in @@ -464,57 +473,6 @@ case "$INSTALL" in esac AC_MSG_CHECKING([make]) -AC_SUBST_FILE([DEPEND]) - -if test "`${MAKE-make} --version -f /dev/null 2>/dev/null |\ - sed -n 1p|cut -c1-8`" = "GNU Make"; then - AC_MSG_RESULT([GNU make]) - GMAKE=yes - if test "X$GCC" = "Xyes"; then - DEPEND=config/depend1 - else - DEPEND=config/depend2 - fi -else - AC_MSG_RESULT([generic]) -fi - -dnl How do we include another file into a Makefile? -if test -z "$DEPEND"; then - AC_MSG_CHECKING([how to include a makefile]) - - dnl The include file contains the target for `foo' - cat >makeinc <<EOF -foo: - @: -EOF - - while true; do #for break - dnl pmake. We have to be careful because some pmake think that the - dnl contents of the MAKE environment variable is a target. - echo '.include <makeinc>' >maketest - if (MAKE= ${MAKE-make} -f maketest foo) >/dev/null 2>&1; then - AC_MSG_RESULT([.include <FILE>]) - DEPEND=config/depend3 - break - fi - - dnl Most make's use `include FILE' - echo 'include makeinc' >maketest - if (${MAKE-make} -f maketest foo) >/dev/null 2>&1; then - AC_MSG_RESULT([include FILE]) - DEPEND=config/depend4 - break; - fi - - dnl default - AC_MSG_RESULT([you have a deficient make command]) - DEPEND=config/dependN - break - done - - rm makeinc maketest -fi dnl ---------------------------------------------------------------------- dnl Sometimes makes think the `.PATH:' appearing before the first rule @@ -856,7 +814,7 @@ AC_TRY_COMPILE([ ], [dev_t d1, d2; if(d1==d2) return 0;], AC_DEFINE([DEV_T_IS_SCALAR], [1], - [Define if \`dev_t' is a scalar]) + [Define if `dev_t' is a scalar]) AC_MSG_RESULT(yes), AC_MSG_RESULT(no) ) @@ -1353,10 +1311,11 @@ dnl ---------------------------------------------------------------------- dnl Is LLNL's PDB present? If so then we'll compile the PDB-to-HDF5 dnl translator. dnl -AC_SUBST([PDB2HDF]) +AC_SUBST([BUILD_PDB2HDF]) AC_CHECK_LIB([pdb], [PD_open]) AC_CHECK_LIB([silo], [lite_PD_open]) -AC_CHECK_HEADERS([pdb.h], [PDB2HDF=pdb2hdf]) +AC_CHECK_HEADERS([pdb.h], [BUILD_PDB2HDF=yes]) +AM_CONDITIONAL([BUILD_PDB2HDF_CONDITIONAL], [test "X$BUILD_PDB2HDF" = "Xyes"]) dnl Checkpoint the cache AC_CACHE_SAVE @@ -1507,7 +1466,7 @@ if test "$STREAM_VFD" = "yes"; then #endif ], [socklen_t foo; return 0;], - AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if \`socklen_t' is defined]) + AC_DEFINE([HAVE_SOCKLEN_T], 1, [Define if `socklen_t' is defined]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) ) @@ -1526,7 +1485,7 @@ AC_TRY_COMPILE([ #include <sys/time.h> #include <time.h>], [struct tm tm; tm.tm_gmtoff=0;], AC_DEFINE([HAVE_TM_GMTOFF], [1], - [Define if \`tm_gmtoff' is a member of \`struct tm']) + [Define if `tm_gmtoff' is a member of `struct tm']) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1536,7 +1495,7 @@ AC_TRY_COMPILE([ #include <sys/time.h> #include <time.h>], [struct tm tm; tm.__tm_gmtoff=0;], AC_DEFINE([HAVE___TM_GMTOFF], [1], - [Define if \`__tm_gmtoff' is a member of \`struct tm']) + [Define if `__tm_gmtoff' is a member of `struct tm']) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1546,7 +1505,7 @@ AC_TRY_LINK([ #include <sys/time.h> #include <time.h>], [timezone=0;], AC_DEFINE([HAVE_TIMEZONE], [1], - [Define if \`timezone' is a global variable]) + [Define if `timezone' is a global variable]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1558,7 +1517,7 @@ AC_TRY_COMPILE([ #include <sys/time.h> #include <time.h>], [struct timezone tz; tz.tz_minuteswest=0;], AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], - [Define if \`struct timezone' is defined]) + [Define if `struct timezone' is defined]) have_struct_tz="yes" AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1600,7 +1559,7 @@ AC_MSG_CHECKING([for st_blocks in struct stat]) AC_TRY_COMPILE([ #include <sys/stat.h>],[struct stat sb; sb.st_blocks=0;], AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], - [Define if \`struct stat' has the \`st_blocks' field]) + [Define if `struct stat' has the `st_blocks' field]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1613,14 +1572,14 @@ AC_CHECK_FUNCS(_scrsize ioctl) AC_MSG_CHECKING([for struct videoconfig]) AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;], AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], - [Define if \`struct videoconfig' is defined]) + [Define if `struct videoconfig' is defined]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) AC_MSG_CHECKING([for struct text_info]) AC_TRY_COMPILE(, [struct text_info w; w.screenwidth=0;], AC_DEFINE([HAVE_STRUCT_TEXT_INFO], [1], - [Define if \`struct text_info' is defined]) + [Define if `struct text_info' is defined]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) @@ -1749,7 +1708,7 @@ done)dnl AC_MSG_RESULT([%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u]) AC_DEFINE_UNQUOTED([PRINTF_LL_WIDTH], ["$hdf5_cv_printf_ll"], - [Width for printf() for type \`long long' or \`__int64', use \`ll']) + [Width for printf() for type `long long' or `__int64', use `ll']) dnl ---------------------------------------------------------------------- dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) @@ -2264,7 +2223,7 @@ if test -n "$PARALLEL"; then AC_TRY_LINK([#include <mpi.h>], [MPI_Comm c_comm; MPI_Comm_c2f(c_comm)], AC_DEFINE([HAVE_MPI_MULTI_LANG_Comm], [1], - [Define if \`MPI_Comm_c2f' and \`MPI_Comm_f2c' exists]) + [Define if `MPI_Comm_c2f' and `MPI_Comm_f2c' exists]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) ) @@ -2273,7 +2232,7 @@ if test -n "$PARALLEL"; then AC_TRY_LINK([#include <mpi.h>], [MPI_Info c_info; MPI_Info_c2f(c_info)], AC_DEFINE([HAVE_MPI_MULTI_LANG_Info], [1], - [Define if \`MPI_Info_c2f' and \`MPI_Info_f2c' exists]) + [Define if `MPI_Info_c2f' and `MPI_Info_f2c' exists]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) ) @@ -2380,7 +2339,7 @@ if test -n "$PARALLEL"; then if test ${hdf5_cv_mpi_file_set_size_big} = "yes"; then AC_DEFINE([MPI_FILE_SET_SIZE_BIG], [1], - [Define if your system's \`MPI_File_set_size' function works for files over 2GB.]) + [Define if your system's `MPI_File_set_size' function works for files over 2GB.]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -2964,12 +2923,19 @@ else fi dnl ---------------------------------------------------------------------- -dnl Build the Makefiles. Almost every Makefile.in will begin with the line -dnl `@COMMENCE@' and end with the line `@CONCLUDE@'. These lines insert -dnl various files from the config directory into the Makefile. +dnl Create automake conditionals to tell automake makefiles which directories +dnl need to be compiled + +AM_CONDITIONAL([BUILD_CXX_CONDITIONAL], [test "X$HDF_CXX" = "Xyes"]) +AM_CONDITIONAL([BUILD_PABLO_CONDITIONAL], [test "X$HAVE_PABLO" = "Xyes"]) +AM_CONDITIONAL([BUILD_PARALLEL_CONDITIONAL], [test -n "$TESTPARALLEL"]) +AM_CONDITIONAL([BUILD_FORTRAN_CONDITIONAL], [test "X$HDF_FORTRAN" = "Xyes"]) +AM_CONDITIONAL([BUILD_HDF5_HL_CONDITIONAL], [test "X$HDF5_HL" = "Xyes"]) + + +dnl ---------------------------------------------------------------------- +dnl Build the Makefiles. dnl -AC_SUBST_FILE([COMMENCE]) COMMENCE=config/commence -AC_SUBST_FILE([CONCLUDE]) CONCLUDE=config/conclude dnl The directory search list AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' @@ -3012,58 +2978,12 @@ if test -n "$TESTPARALLEL"; then fi fi - - -if test "X$HDF_FORTRAN" = "Xyes"; then - FORTRAN_FILES="fortran/Makefile - fortran/src/h5fc - fortran/src/H5fortran_types.f90 - fortran/src/libhdf5_fortran.settings - fortran/src/Makefile - fortran/test/Makefile - $FORTRAN_PARALLEL_MAKE - fortran/examples/Makefile" -fi - -if test "X$HDF_CXX" = "Xyes"; then - CXX_FILES="c++/Makefile - c++/src/Makefile - c++/src/h5c++ - c++/test/Makefile - c++/examples/Makefile" -fi - -# conditionally generate the high level makefiles -if test "X$HDF5_HL" = "Xyes"; then - HL_FILES="hl/Makefile - hl/src/Makefile - hl/test/Makefile" -fi - -# with FORTRAN support -if test "X$HDF5_HL" = "Xyes" && test "X$HDF_FORTRAN" = "Xyes"; then - HL_FILES="hl/Makefile - hl/src/Makefile - hl/test/Makefile - hl/fortran/Makefile - hl/fortran/src/Makefile - hl/fortran/test/Makefile" -# name of folder inside "hl" -HL_FOR="fortran" -fi - AC_CONFIG_FILES([src/libhdf5.settings - config/depend1 - config/depend2 - config/depend3 - config/depend4 - config/dependN - config/commence - config/conclude Makefile src/Makefile test/Makefile - $PARALLEL_MAKE + testpar/Makefile + testpar/testph5.sh perform/Makefile tools/Makefile tools/h5dump/Makefile @@ -3094,9 +3014,25 @@ AC_CONFIG_FILES([src/libhdf5.settings doc/html/Tutor/examples/Makefile doc/html/cpplus/Makefile doc/html/fortran/Makefile - $FORTRAN_FILES - $CXX_FILES - $HL_FILES]) + c++/Makefile + c++/src/Makefile + c++/src/h5c++ + c++/test/Makefile + c++/examples/Makefile + fortran/Makefile + fortran/src/h5fc + fortran/src/H5fortran_types.f90 + fortran/src/libhdf5_fortran.settings + fortran/src/Makefile + fortran/test/Makefile + fortran/testpar/Makefile + fortran/examples/Makefile + hl/Makefile + hl/src/Makefile + hl/test/Makefile + hl/fortran/Makefile + hl/fortran/src/Makefile + hl/fortran/test/Makefile]) AC_OUTPUT no_create=$saved_no_create |