diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 363 |
1 files changed, 198 insertions, 165 deletions
diff --git a/configure.in b/configure.in index ed7d296..d6fddf6 100644 --- a/configure.in +++ b/configure.in @@ -538,7 +538,7 @@ dnl Check for these two functions before <sys/time.h> is checked for, otherwise dnl they are not detected correctly on Solaris [2.6]. dnl AC_CHECK_FUNCS(difftime) -AC_CHECK_FUNCS([gettimeofday], [have_gettime="yes"], [have_gettime="no"]) +AC_CHECK_FUNCS(gettimeofday, [have_gettime="yes"], [have_gettime="no"]) dnl Unix AC_CHECK_HEADERS([sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h]) @@ -1086,9 +1086,11 @@ case "$withval" in ;; esac -dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage -dnl driver. SSL must be tested before them. -AC_SUBST(SSL) SSL=yes +dnl ---------------------------------------------------------------------- +dnl Is SSL library present? It is needed by GLOBUS-GASS and Grid Storage +dnl driver. SSL must be tested before them. +dnl +AC_SUBST([SSL]) SSL=yes AC_ARG_WITH([ssl], [AC_HELP_STRING([--with-ssl=LIB], [Use the SSL library [default=no]])],, @@ -1096,12 +1098,12 @@ AC_ARG_WITH([ssl], case "$withval" in yes) - AC_CHECK_LIB(crypto,main,,unset SSL) - AC_CHECK_LIB(ssl,SSL_get_version,,unset SSL) + AC_CHECK_LIB([crypto], [main],, [unset SSL]) + AC_CHECK_LIB([ssl], [SSL_get_version],, [unset SSL]) ;; no) - AC_MSG_CHECKING(for SSL) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for SSL]) + AC_MSG_RESULT([suppressed]) unset SSL ;; *) @@ -1109,8 +1111,8 @@ case "$withval" in if test "X$with_ssl" != "X/usr/lib"; then LDFLAGS="$LDFLAGS -L$with_ssl" fi - AC_CHECK_LIB(crypto,main,, LDFLAGS="$saved_LDFLAGS"; unset SSL) - AC_CHECK_LIB(ssl,SSL_get_version,, LDFLAGS="$saved_LDFLAGS"; unset SSL) + AC_CHECK_LIB([crypto], [main],, [LDFLAGS="$saved_LDFLAGS"; unset SSL]) + AC_CHECK_LIB([ssl], [SSL_get_version],, [LDFLAGS="$saved_LDFLAGS"; unset SSL]) ;; esac @@ -1118,8 +1120,8 @@ dnl ---------------------------------------------------------------------- dnl Is GLOBUS-GASS(1.1.0 or 1.1.1) Library present? It is also needed by dnl the Grid Storage driver. dnl -AC_SUBST(GASS) GASS="yes" -AC_SUBST(TESTGASS) TESTGASS='$(srcdir)/testgass' +AC_SUBST([GASS]) GASS="yes" +AC_SUBST([TESTGASS]) TESTGASS='$(srcdir)/testgass' AC_ARG_WITH([gass], [AC_HELP_STRING([--with-gass=DIR], [Use the GASS library [default=no]])],, @@ -1140,8 +1142,8 @@ case "$withval" in ;; no) - AC_MSG_CHECKING(for GASS) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for GASS]) + AC_MSG_RESULT([suppressed]) unset GASS TESTGASS ;; @@ -1171,11 +1173,11 @@ case "$withval" in if test -n "$gass_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$gass_inc" - AC_CHECK_HEADERS(globus_common.h,, + AC_CHECK_HEADERS([globus_common.h],, CPPFLAGS="$saved_CPPFLAGS" unset GASS TESTGASS) else - AC_CHECK_HEADERS(globus_common.h) + AC_CHECK_HEADERS([globus_common.h]) fi if test -n "$gass_lib"; then @@ -1205,15 +1207,14 @@ case "$withval" in esac if test -n "$GASS"; then - AC_DEFINE([HAVE_GASS], [1], - [Define if the Globus GASS is defined]) + AC_DEFINE([HAVE_GASS], [1], [Define if the Globus GASS is defined]) fi dnl ---------------------------------------------------------------------- dnl Are SRB Client and other system libraries(socket, elf) present? dnl -AC_SUBST(SRB) SRB="yes" -AC_SUBST(TESTSRB) TESTSRB='$(srcdir)/testsrb' +AC_SUBST([SRB]) SRB="yes" +AC_SUBST([TESTSRB]) TESTSRB='$(srcdir)/testsrb' AC_ARG_WITH([srb], [AC_HELP_STRING([--with-srb=DIR], [Use the SRB library [default=no]])],, @@ -1221,14 +1222,14 @@ AC_ARG_WITH([srb], case "$withval" in yes) - AC_CHECK_HEADERS(srbClient.h,,unset SRB TESTSRB) - AC_CHECK_LIB(elf,main,,unset SRB TESTSRB) - AC_CHECK_LIB(socket,main,,unset SRB TESTSRB) - AC_CHECK_LIB(SrbClient,clConnect,,unset SRB TESTSRB) + AC_CHECK_HEADERS([srbClient.h],, [unset SRB TESTSRB]) + AC_CHECK_LIB([elf], [main],, [unset SRB TESTSRB]) + AC_CHECK_LIB([socket], [main],, [unset SRB TESTSRB]) + AC_CHECK_LIB([SrbClient], [clConnect],, [unset SRB TESTSRB]) ;; no) - AC_MSG_CHECKING(for SRB) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for SRB]) + AC_MSG_RESULT([suppressed]) unset SRB TESTSRB ;; *) @@ -1279,18 +1280,17 @@ case "$withval" in esac if test -n "$SRB"; then - AC_DEFINE(HAVE_SRB, 1, - [Define if the SRB is defined]) + AC_DEFINE([HAVE_SRB], [1], [Define if the SRB is defined]) fi dnl ---------------------------------------------------------------------- dnl Is LLNL's PDB present? If so then we'll compile the PDB-to-HDF5 dnl translator. dnl -AC_SUBST(PDB2HDF) -AC_CHECK_LIB(pdb, PD_open) -AC_CHECK_LIB(silo, lite_PD_open) -AC_CHECK_HEADERS(pdb.h, PDB2HDF=pdb2hdf) +AC_SUBST([PDB2HDF]) +AC_CHECK_LIB([pdb], [PD_open]) +AC_CHECK_LIB([silo], [lite_PD_open]) +AC_CHECK_HEADERS([pdb.h], [PDB2HDF=pdb2hdf]) dnl Checkpoint the cache AC_CACHE_SAVE @@ -1302,8 +1302,7 @@ dnl `--with-pthread' command-line switch. The value is an include path dnl and/or a library path. If the library path is specified then it must dnl be preceded by a comma. dnl -AC_SUBST(PTHREAD) PTHREAD=yes - +AC_SUBST([PTHREAD]) PTHREAD=yes AC_ARG_WITH([pthread], [AC_HELP_STRING([--with-pthread=DIR], [Use the Pthreads library [default=no]])],, @@ -1311,12 +1310,12 @@ AC_ARG_WITH([pthread], case "$withval" in yes) - AC_CHECK_HEADERS(pthread.h) - AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD) + AC_CHECK_HEADERS([pthread.h]) + AC_CHECK_LIB([pthread], [pthread_create],, [unset PTHREAD]) ;; no) - AC_MSG_CHECKING(for pthread) - AC_MSG_RESULT(suppressed) + AC_MSG_CHECKING([for pthread]) + AC_MSG_RESULT([suppressed]) unset PTHREAD ;; *) @@ -1345,18 +1344,18 @@ case "$withval" in if test -n "$pthread_inc"; then saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$pthread_inc" - AC_CHECK_HEADERS(pthread.h,,CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD) + AC_CHECK_HEADERS([pthread.h],, [CPPFLAGS="$saved_CPPFLAGS"; unset PTHREAD]) else - AC_CHECK_HEADERS(pthread.h,,unset PTHREAD) + AC_CHECK_HEADERS([pthread.h],, [unset PTHREAD]) fi 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) + AC_CHECK_LIB([pthread], [pthread_create],, + [LDFLAGS="$saved_LDFLAGS"; unset PTHREAD]) else - AC_CHECK_LIB(pthread, pthread_create,,unset PTHREAD) + AC_CHECK_LIB([pthread], [pthread_create],, [unset PTHREAD]) fi ;; esac @@ -1364,7 +1363,7 @@ esac dnl ---------------------------------------------------------------------- dnl Enable thread-safe version of library. It requires Pthreads support. dnl -AC_MSG_CHECKING(for thread safe support) +AC_MSG_CHECKING([for thread safe support]) AC_ARG_ENABLE([threadsafe], [AC_HELP_STRING([--enable-threadsafe], [Enable thread safe capability])], @@ -1372,23 +1371,22 @@ AC_ARG_ENABLE([threadsafe], case "X-$THREADSAFE" in X-|X-no) - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) ;; X-yes) dnl Check that we can link a simple Pthread program. - AC_TRY_LINK(,pthread_create(), - AC_MSG_RESULT(yes); THREADSAFE=yes, - AC_MSG_ERROR(needed pthread library not available)) + AC_TRY_LINK(, [pthread_create()], + [AC_MSG_RESULT([yes]); THREADSAFE=yes], + [AC_MSG_ERROR([needed pthread library not available])]) ;; *) - AC_MSG_RESULT(error) - AC_MSG_ERROR(\'$enableval\' is not a valid threadsafe type) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enableval\' is not a valid threadsafe type]) ;; esac if test "X$THREADSAFE" = "Xyes"; then - AC_DEFINE([HAVE_THREADSAFE], [1], - [Define if we have thread safe support]) + AC_DEFINE([HAVE_THREADSAFE], [1], [Define if we have thread safe support]) fi dnl ---------------------------------------------------------------------- @@ -1443,8 +1441,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]) ) @@ -1458,47 +1455,47 @@ dnl Posix way to do this? dnl dnl First check if `struct tm' has a `tm_gmtoff' member. -AC_MSG_CHECKING(for tm_gmtoff in struct tm) +AC_MSG_CHECKING([for tm_gmtoff in struct tm]) AC_TRY_COMPILE([ #include <sys/time.h> -#include <time.h>],[struct tm tm; tm.tm_gmtoff=0;], -AC_DEFINE(HAVE_TM_GMTOFF, 1, +#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']) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl check if `struct tm' has a `__tm_gmtoff' member. -AC_MSG_CHECKING(for __tm_gmtoff in struct tm) +AC_MSG_CHECKING([for __tm_gmtoff in struct tm]) AC_TRY_COMPILE([ #include <sys/time.h> -#include <time.h>],[struct tm tm; tm.__tm_gmtoff=0;], -AC_DEFINE(HAVE___TM_GMTOFF, 1, +#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']) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl Check whether the global variable `timezone' is defined. -AC_MSG_CHECKING(for global timezone variable) +AC_MSG_CHECKING([for global timezone variable]) AC_TRY_LINK([ #include <sys/time.h> #include <time.h>], [timezone=0;], -AC_DEFINE(HAVE_TIMEZONE, 1, +AC_DEFINE([HAVE_TIMEZONE], [1], [Define if \`timezone' is a global variable]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl Check whether `struct timezone' is defined. AC_STRUCT_TIMEZONE -AC_MSG_CHECKING(for struct timezone) +AC_MSG_CHECKING([for struct timezone]) AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/time.h> -#include <time.h>],[struct timezone tz; tz.tz_minuteswest=0;], -AC_DEFINE(HAVE_STRUCT_TIMEZONE, 1, +#include <time.h>], [struct timezone tz; tz.tz_minuteswest=0;], +AC_DEFINE([HAVE_STRUCT_TIMEZONE], [1], [Define if \`struct timezone' is defined]) have_struct_tz="yes" -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl If gettimeofday() is going to be used, make sure it uses the timezone struct @@ -1532,13 +1529,13 @@ fi dnl ---------------------------------------------------------------------- dnl Does the struct stat have the st_blocks field? This field is not Posix. dnl -AC_MSG_CHECKING(for st_blocks in struct stat) +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, +AC_DEFINE([HAVE_STAT_ST_BLOCKS], [1], [Define if \`struct stat' has the \`st_blocks' field]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- dnl How do we figure out the width of a tty in characters? @@ -1546,33 +1543,33 @@ dnl AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo) AC_CHECK_FUNCS(_scrsize ioctl) -AC_MSG_CHECKING(for struct videoconfig) +AC_MSG_CHECKING([for struct videoconfig]) AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;], -AC_DEFINE(HAVE_STRUCT_VIDEOCONFIG, 1, +AC_DEFINE([HAVE_STRUCT_VIDEOCONFIG], [1], [Define if \`struct videoconfig' is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +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, +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]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) -AC_MSG_CHECKING(for TIOCGWINSZ) +AC_MSG_CHECKING([for TIOCGWINSZ]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGWINSZ;], -AC_DEFINE(HAVE_TIOCGWINSZ, 1, +AC_DEFINE([HAVE_TIOCGWINSZ], [1], [Define if the ioctl TIOGWINSZ is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) -AC_MSG_CHECKING(for TIOCGGETD) +AC_MSG_CHECKING([for TIOCGETD]) AC_TRY_COMPILE([#include <sys/ioctl.h>],[int w=TIOCGETD;], -AC_DEFINE(HAVE_TIOCGETD, 1, +AC_DEFINE([HAVE_TIOCGETD], [1], [Define if the ioctl TIOCGETD is defined]) -AC_MSG_RESULT(yes), -AC_MSG_RESULT(no)) +AC_MSG_RESULT([yes]), +AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- @@ -1590,17 +1587,17 @@ AC_C_INLINE AC_MSG_CHECKING([for __attribute__ extension]) AC_TRY_COMPILE(,[int __attribute__((unused)) x], - AC_DEFINE(HAVE_ATTRIBUTE, 1, + AC_DEFINE([HAVE_ATTRIBUTE], [1], [Define if the __attribute__(()) extension is present]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) AC_MSG_CHECKING([for __FUNCTION__ extension]) AC_TRY_COMPILE(,[(void)__FUNCTION__], - AC_DEFINE(HAVE_FUNCTION, 1, + AC_DEFINE([HAVE_FUNCTION], [1], [Define if the compiler understand the __FUNCTION__ keyword]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no)) + AC_MSG_RESULT([yes]), + AC_MSG_RESULT([no])) dnl ---------------------------------------------------------------------- dnl Try to figure out how to print `long long'. Some machines use `%lld' @@ -1610,12 +1607,12 @@ dnl Need to patch up LD_LIBRARY_PATH so that the execution can find all dnl the dynamic library. The correct way to do it should be updating dnl LD_LIBRARY_PATH along with LDFLAGS or do it with the AC_TRY_RUN macro. dnl -AC_MSG_CHECKING(how to print long long) +AC_MSG_CHECKING([how to print long long]) AC_CACHE_VAL([hdf5_cv_printf_ll], LD_LIBRARY_PATH="$LD_LIBRARY_PATH`echo $LDFLAGS | sed -e 's/-L/:/g' -e 's/ //g'`" export LD_LIBRARY_PATH -for hdf5_cv_printf_ll in l L q ll unknown; do +for hdf5_cv_printf_ll in l L ll q unknown; do AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> @@ -1631,8 +1628,8 @@ int main(void) ], break,,continue) 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", +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']) dnl ---------------------------------------------------------------------- @@ -1640,8 +1637,8 @@ dnl Check if pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) dnl is supported on this system dnl AC_MSG_CHECKING([Threads support system scope]) -AC_CACHE_VAL(hdf5_cv_system_scope_threads, -AC_TRY_RUN([ +AC_CACHE_VAL([hdf5_cv_system_scope_threads], +[AC_TRY_RUN([ #if STDC_HEADERS #include <stdlib.h> #include <pthread.h> @@ -1656,14 +1653,14 @@ int main(void) ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); exit(ret==0 ? 0 : 1); } -], hdf5_cv_system_scope_threads=yes, hdf5_cv_system_scope_threads=no,)) +], [hdf5_cv_system_scope_threads=yes], [hdf5_cv_system_scope_threads=no],)]) if test ${hdf5_cv_system_scope_threads} = "yes"; then - AC_DEFINE(SYSTEM_SCOPE_THREADS, 1, + AC_DEFINE([SYSTEM_SCOPE_THREADS], [1], [Define if your system supports pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM) call.]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) fi dnl ---------------------------------------------------------------------- @@ -1683,10 +1680,10 @@ case "X-$enableval" in [int fd = 0; gpfs_fcntl(fd, (void *)0);], AC_DEFINE(HAVE_GPFS, 1, [Define if we have GPFS support]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) LIBS="$LIBS -lgpfs" GPFS="yes", - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) GPFS="no")) ;; X-no|*) @@ -1714,20 +1711,20 @@ case "X-$DEBUG_PKG" in X-yes) DEBUG_PKG="d,e,f,g,hg,i,mm,o,p,s,t,v,z" CPPFLAGS="$CPPFLAGS -UNDEBUG" - AC_MSG_RESULT(default ($DEBUG_PKG)) + AC_MSG_RESULT([default ($DEBUG_PKG)]) ;; X-all) DEBUG_PKG=$all_packages CPPFLAGS="$CPPFLAGS -UNDEBUG" - AC_MSG_RESULT(all ($DEBUG_PKG)) + AC_MSG_RESULT([all ($DEBUG_PKG)]) ;; X-|X-no|X-none) - AC_MSG_RESULT(none) + AC_MSG_RESULT([none]) DEBUG_PKG= CPPFLAGS="$CPPFLAGS -DNDEBUG" ;; *) - AC_MSG_RESULT($DEBUG_PKG) + AC_MSG_RESULT([$DEBUG_PKG]) ;; esac @@ -1771,14 +1768,14 @@ dnl ---------------------------------------------------------------------- dnl Enable tracing of the API dnl This must come after the enable-debug since it depends on debug. dnl -AC_MSG_CHECKING(for API tracing); +AC_SUBST([TRACE_API]) +AC_MSG_CHECKING([for API tracing]); AC_ARG_ENABLE([trace], [AC_HELP_STRING([--enable-trace], - [Enable API tracing capability. - Default=no if debug is disabled.])], + [Enable API tracing capability. Default=no + if debug is disabled.])], TRACE=$enableval) -AC_SUBST(TRACE_API) dnl Default to no if debug is disabled if test "X-$TRACE" = X- ; then if test -z "$DEBUG_PKG" ; then @@ -1789,17 +1786,51 @@ if test "X-$TRACE" = X- ; then fi case "X-$TRACE" in X-yes) - AC_MSG_RESULT(yes) + AC_MSG_RESULT([yes]) TRACE_API=yes CPPFLAGS="$CPPFLAGS -DH5_DEBUG_API" ;; X-no|*) - AC_MSG_RESULT(no) + AC_MSG_RESULT([no]) TRACE_API=no CPPFLAGS="$CPPFLAGS -UH5_DEBUG_API" ;; esac +dnl ---------------------------------------------------------------------- +dnl Enable instrumenting of the library's internal operations +dnl This must come after the enable-debug since it depends on debug. +dnl +AC_SUBST([INSTRUMENT_LIBRARY]) +AC_MSG_CHECKING([for instrumented library]); +AC_ARG_ENABLE([instrument], + [AC_HELP_STRING([--enable-instrument], + [Enable library instrumentation of optimization + tracing. Default=no if debug is disabled.])], + INSTRUMENT=$enableval) + +dnl Default to no if debug is disabled +if test "X-$INSTRUMENT" = X- ; then + if test -z "$DEBUG_PKG" ; then + INSTRUMENT=no + else + INSTRUMENT=yes + fi +fi + +case "X-$INSTRUMENT" in + X-yes) + AC_MSG_RESULT([yes]) + INSTRUMENT_LIBRARY=yes + AC_DEFINE([HAVE_INSTRUMENTED_LIBRARY], [1], + [Define if library will contain instrumentation to detect correct optimization operation]) + ;; + X-no|*) + AC_MSG_RESULT([no]) + INSTRUMENT_LIBRARY=no + ;; +esac + dnl Checkpoint the cache AC_CACHE_SAVE @@ -1840,10 +1871,10 @@ 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([PARALLEL]) +AC_SUBST([RUNSERIAL]) +AC_SUBST([RUNPARALLEL]) +AC_SUBST([TESTPARALLEL]) dnl ---------------------------------------------------------------------- dnl If the compiler is obviously a parallel compiler then we're building @@ -1948,23 +1979,23 @@ case "X-$enable_parallel" in 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) + 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) + 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)) + 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)) + 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. @@ -1974,8 +2005,8 @@ case "X-$enable_parallel" in ;; *) - AC_MSG_RESULT(error) - AC_MSG_ERROR(\'$enable_parallel\' is not a valid parallel search type) + AC_MSG_RESULT([error]) + AC_MSG_ERROR([\'$enable_parallel\' is not a valid parallel search type]) ;; esac @@ -1991,26 +2022,25 @@ 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, 1, - [Define if we have parallel support]) + AC_DEFINE([HAVE_PARALLEL], [1], [Define if we have parallel support]) 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) + 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')) + 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) + AC_MSG_ERROR([no way to run a parallel program]) fi dnl If RUNSERIAL or RUNPARALLEL is the word `none' then replace it with @@ -2028,7 +2058,7 @@ if test -n "$PARALLEL"; then dnl This must be done after enable-parallel is checked since it depends dnl on a mpich compiler. dnl - AC_SUBST(MPE) MPE=yes + AC_SUBST([MPE]) MPE=yes AC_ARG_WITH([mpe], [AC_HELP_STRING([--with-mpe=DIR], [Use MPE instrumentation [default=no]])],, @@ -2173,7 +2203,7 @@ dnl This is defined only when we're using CodeWarrior, since it has a dnl broken "open()" call. dnl if test 1 = 2; then - AC_DEFINE(NO_SHARED_WRITING, 1, + AC_DEFINE([NO_SHARED_WRITING], [1], [Define if shared writing must be disabled (CodeWarrior only)]) fi @@ -2201,22 +2231,22 @@ dnl dnl HDF5 version from the first line of the README.txt file. H5_VERSION="`cut -d' ' -f3 $srcdir/README.txt | head -1`" -AC_SUBST(H5_VERSION) +AC_SUBST([H5_VERSION]) dnl Configuration date -AC_SUBST(CONFIG_DATE) CONFIG_DATE="`date`" +AC_SUBST([CONFIG_DATE]) CONFIG_DATE="`date`" dnl User doing the configuration -AC_SUBST(CONFIG_USER) CONFIG_USER="`whoami`@`hostname`" +AC_SUBST([CONFIG_USER]) CONFIG_USER="`whoami`@`hostname`" if test -n "$ORGANIZATION"; then CONFIG_USER="$CONFIG_USER at $ORGANIZATION" fi dnl Configuration mode (production, development, profile, etc) saved above. -AC_SUBST(CONFIG_MODE) +AC_SUBST([CONFIG_MODE]) dnl Byte sex from the AC_C_BIGENDIAN macro. -AC_SUBST(BYTESEX) +AC_SUBST([BYTESEX]) if test "X$ac_cv_c_bigendian" = "Xyes"; then BYTESEX="big-endian" else @@ -2230,7 +2260,7 @@ dnl might have decided that one or the other is simply not possible. dnl Therefore we have to look in the generated `libtool' shell script for dnl lines that set the value of `build_libtool_libs' (shared) and dnl `build_old_libs' (static). -AC_SUBST(STATIC_SHARED) +AC_SUBST([STATIC_SHARED]) if (grep '^build_libtool_libs=yes' libtool >/dev/null); then enable_shared=yes else @@ -2256,7 +2286,7 @@ PARALLEL=${PARALLEL:-no} 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) +AC_SUBST([CC_VERSION]) if `echo $CC | grep / 2>&1 /dev/null`; then CC_VERSION="$CC" else @@ -2283,14 +2313,15 @@ if test -x /bin/pwd; then else pwd=pwd fi -AC_SUBST(ROOT) ROOT="`$pwd`" +AC_SUBST([ROOT]) ROOT="`$pwd`" dnl ---------------------------------------------------------------------- dnl Determine the runtime libraries we may need to include in the dnl libtools command so that executables will find the correct dynamic dnl libraries. dnl -DYNAMIC_DIRS="" +AC_SUBST([DYNAMIC_DIRS]) DYNAMIC_DIRS="" + if test -n "$LDFLAGS"; then for d in $LDFLAGS ; do case "$d" in @@ -2308,7 +2339,6 @@ if test -n "$LDFLAGS"; then esac done fi -AC_SUBST(DYNAMIC_DIRS) if test -n "$CPPFLAGS"; then TEMP_CPPFLAGS="" @@ -2331,21 +2361,21 @@ 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 -AC_SUBST_FILE(COMMENCE) COMMENCE=config/commence -AC_SUBST_FILE(CONCLUDE) CONCLUDE=config/conclude +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' +AC_SUBST([SEARCH]) SEARCH='$(srcdir) $(top_builddir)/src $(top_srcdir)/src' cmd='echo $SEARCH |sed "s/ /'$SEARCH_SEP'/g"' SEARCH="$SEARCH_RULE`eval $cmd`" 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. +dnl GNU make because 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 @@ -2372,9 +2402,9 @@ fi PABLO_MAKE="" -AC_SUBST(PARALLEL_PABLO) PARALLEL_PABLO="" +AC_SUBST([PARALLEL_PABLO]) PARALLEL_PABLO="" -if test "$HAVE_PABLO" = "yes"; then +if test "X$HAVE_PABLO" = "Xyes"; then PABLO_MAKE="pablo/Makefile" if test -n "$TESTPARALLEL"; then @@ -2551,6 +2581,9 @@ IF_YES_NO "$STATIC_EXEC" PRINT_N " Tracing" IF_YES_NO "$TRACE_API" +PRINT_N " Optimization Instrumentation" +IF_YES_NO "$INSTRUMENT" + PRINT "Languages:" PRINT_N " C++" |