dnl ************************************************************** dnl PVFS2 AUTOCONF SCRIPT dnl dnl Process this file with autoconf to produce a configure script. dnl You may need to use autoheader as well if changing any DEFINEs dnl sanity checks, output header, location of scripts used here AC_INIT(darshan.h) AC_CONFIG_AUX_DIR(maint/config) AC_CONFIG_HEADER(darshan-config.h) AC_PROG_INSTALL CHECK_ZLIB dnl Check byte ordering AC_C_BIGENDIAN AC_ARG_WITH(mpi, [ --with-mpi= Location of the MPI installation], if test x$withval = xyes; then AC_MSG_ERROR(--with-mpi must be given a pathname) else MPICC="${withval}/bin/mpicc" HAVE_MPICC="yes" fi ) if test x$HAVE_MPICC != xyes; then AC_CHECK_PROG(HAVE_MPICC, mpicc, yes, no) if test x$HAVE_MPICC = xyes; then MPICC=mpicc fi fi AC_SUBST(MPICC) AC_ARG_WITH(mem-align, [ --with-mem-align= Memory alignment in bytes], if test x$withval = xyes; then AC_MSG_ERROR(--with-mem-align must be given a number in bytes) else AC_DEFINE_UNQUOTED(__CP_MEM_ALIGNMENT, ${withval}, Memory alignment in bytes) GOT_ALIGNMENT=1 fi ) AC_ARG_WITH(zlib-for-mpi, [ --with-zlib-for-mpi= base dir for zlib to use on mpi processes], if test x$withval = xyes; then AC_MSG_ERROR(--with-zlib-for-mpi must be given a path argument) else __CP_ZLIB_LINK_FLAGS="-L${withval}/lib" __CP_ZLIB_INCLUDE_FLAGS="-I ${withval}/include" fi ) AC_ARG_WITH(log-path, [ --with-log-path= Location to store log files at run time], if test x$withval = xyes; then AC_MSG_ERROR(--with-log-path must be given a pathname) else AC_DEFINE_UNQUOTED(__CP_LOG_PATH, "${withval}", Location to store log files at run time) __CP_LOG_PATH="${withval}" GOT_LOG_PATH=1 fi ) saveCC="$CC" CC="$MPICC" if test x$HAVE_MPICC != "xyes"; then AC_MSG_ERROR(must provide --with-mpi= argument to configure if mpicc is not in path.) fi if test x$GOT_ALIGNMENT != x1; then AC_MSG_ERROR(must provide --with-mem-align= argument to configure.) fi if test x$GOT_LOG_PATH != x1; then AC_MSG_ERROR(must provide --with-log-path= argument to configure.) fi AC_MSG_CHECKING(whether the mpicc compiler works) AC_TRY_COMPILE([#include ], [int ret = MPI_Init(0, (void*)0)], AC_MSG_RESULT(yes), AC_MSG_RESULT(no) AC_MSG_ERROR($CC doesn't appear to be a valid MPI compiler) ) dnl temporarily set large file flags just for this test; we don't want dnl it to propigate to the makefile because of zlib bugs old_cflags="$CFLAGS" CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE" AC_MSG_CHECKING(for off64_t) AC_TRY_COMPILE( [ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include ], [ off64_t off; ], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_OFF64_T, 1, Define if off64_t type is defined), AC_MSG_RESULT(no) ) CFLAGS="$old_cflags" # libc functions wrapped by darshan CP_WRAPPERS="-Wl,-u,MPI_Wtime,-wrap,write,-wrap,open,-wrap,creat,-wrap,creat64,-wrap,open64,-wrap,close,-wrap,read,-wrap,lseek,-wrap,lseek64,-wrap,pread,-wrap,pwrite,-wrap,readv,-wrap,writev,-wrap,__xstat,-wrap,__lxstat,-wrap,__fxstat,-wrap,__xstat64,-wrap,__lxstat64,-wrap,__fxstat64,-wrap,mmap,-wrap,mmap64,-wrap,fopen,-wrap,fclose,-wrap,fread,-wrap,fwrite,-wrap,fseek,-wrap,fopen64,-wrap,pread64,-wrap,pwrite64,-wrap,fsync,-wrap,fdatasync,-wrap,ncmpi_create,-wrap,ncmpi_open,-wrap,ncmpi_close,-wrap,H5Fcreate,-wrap,H5Fopen,-wrap,H5Fclose" # ,-u,__wrap___fxstat64,-u,pthread_mutex_lock,-u,pthread_mutex_unlock if test "x$prefix" = xNONE; then darshan_lib_path=$ac_default_prefix/lib darshan_bin_path=$ac_default_prefix/bin else darshan_lib_path=$prefix/lib darshan_bin_path=$prefix/bin fi AC_SUBST(darshan_lib_path) AC_SUBST(darshan_bin_path) AC_SUBST(__CP_LOG_PATH) AC_SUBST(__CP_ZLIB_LINK_FLAGS) AC_SUBST(__CP_ZLIB_INCLUDE_FLAGS) AC_SUBST(CP_WRAPPERS) AC_CHECK_SIZEOF([long int]) AC_OUTPUT(Makefile compilers/mpixlc_r-trace-bgp-V1R4 compilers/mpixlcxx_r-trace-bgp-V1R4 compilers/mpixlf2003_r-trace-bgp-V1R4 compilers/mpixlf77_r-trace-bgp-V1R4 compilers/mpixlf90_r-trace-bgp-V1R4 compilers/mpixlf95_r-trace-bgp-V1R4 compilers/mpixlc-trace-bgp-V1R4 compilers/mpixlf77-trace-bgp-V1R4 compilers/mpixlf90-trace-bgp-V1R4 compilers/mpixlf95-trace-bgp-V1R4 compilers/mpixlcxx-trace-bgp-V1R4 compilers/mpixlf2003-trace-bgp-V1R4 compilers/mpicc-trace-bgp-V1R4 compilers/mpicxx-trace-bgp-V1R4 compilers/mpif77-trace-bgp-V1R4 compilers/mpif90-trace-bgp-V1R4 compilers/fast/mpixlc_r-trace-bgp-V1R4 compilers/fast/mpixlcxx_r-trace-bgp-V1R4 compilers/fast/mpixlf2003_r-trace-bgp-V1R4 compilers/fast/mpixlf77_r-trace-bgp-V1R4 compilers/fast/mpixlf90_r-trace-bgp-V1R4 compilers/fast/mpixlf95_r-trace-bgp-V1R4 compilers/fast/mpixlc-trace-bgp-V1R4 compilers/fast/mpixlf77-trace-bgp-V1R4 compilers/fast/mpixlf90-trace-bgp-V1R4 compilers/fast/mpixlf95-trace-bgp-V1R4 compilers/fast/mpixlcxx-trace-bgp-V1R4 compilers/fast/mpixlf2003-trace-bgp-V1R4 compilers/fast/mpicc-trace-bgp-V1R4 compilers/fast/mpicxx-trace-bgp-V1R4 compilers/fast/mpif77-trace-bgp-V1R4 compilers/fast/mpif90-trace-bgp-V1R4 compilers/mpicc-trace-pcarns compilers/mpicxx-trace-pcarns compilers/mpif77-trace-pcarns darshan-mk-log-dirs.pl darshan-gen-cc.pl darshan-gen-cxx.pl darshan-gen-fortran.pl )